---
title: "Creates or updates a Recipe from existing Flows"
method: POST
path: "/flows/export-to-recipe"
tags: ["recipes", "flows"]
---

# Creates or updates a Recipe from existing Flows

`POST /flows/export-to-recipe`

You need `workspaces.recipe.edit` and `workspaces.flow.exportToRecipe` permissions to access this resource

## Request body

- object
  - `data` object, required
    - `type` 'flows-export-to-recipe-config', required
    - `attributes` union, required
      - object — Attributes to create new Recipe
        - `title` string — Recipe title
        - `description` string — Recipe description. Markdown is supported
        - `short_description` string — Recipe short description
        - `flow_ids` string[], required — List of Flow Ids to create a Recipe from
        - `dest_workspace_id` string, required — An Id of the Workspace
        - `credentials_match` object — Object used to match Credentials in Flows to Recipe's Credentials. Keys in this object are Credential Ids used in Flow
        - `visibility` 'workspace' | 'contract' | 'tenant' | 'global' — Recipe sharing mode. Value must be one of `workspace`, `contract`, `tenant` or `global`
      - object — Attributes to update existing Recipe
        - `title` string — Recipe title
        - `description` string — Recipe description. Markdown is supported
        - `short_description` string — Recipe short description
        - `flow_ids` string[], required — List of Flow Ids to create a Recipe from
        - `recipe_id` string, required — An Id of the Recipe
        - `credentials_match` object — Object used to match Credentials in Flows to Recipe's Credentials. Keys in this object are Credential Ids used in Flow
        - `visibility` 'workspace' | 'contract' | 'tenant' | 'global' — Recipe sharing mode. Value must be one of `workspace`, `contract`, `tenant` or `global`

## Response `200`

OK (when recipe is updated)

- object
  - `data` object, required
    - `id` string, required
    - `type` 'recipe', required
    - `links` object, required
      - `self` string, required
    - `attributes` object, required
      - `allow_modification` boolean — When this attribute is set to true, the Recipe activator can change step configurations before activation. In this scenario, the created integration Flow is not linked to the original recipe, and users do not receive the Recipe's updates.The feature is activated only on Recipe creation and can't be changed.
      - `declarations` object
        - `variables` object[] — List of variables used by steps in a flow
          - `id` string, required
          - `title` string, required
          - `help` object
            - `description` string, required
            - `link` string
        - `credentials` object[] — List of credentials used by steps in a flow
          - `id` string, required
          - `help` object
            - `description` string, required
        - `topics` object[] — List of Topics data used by steps in a flow that will be created upon Recipe activation
          - `id` string, required
          - `schema` object, required — JSON schema describing the objects to be exchanged
      - `visibility` 'workspace' | 'contract' | 'tenant' | 'global', required
      - `info` object, required
        - `title` string, required — Recipe title
        - `author` string
        - `description` string, required — Recipe description. Markdown is supported
        - `short_description` string, required — Recipe short description
      - `flow_templates` object[], required
        - `title` string, required — Flow template title
        - `cron` string — Cron expression to schedule executions for polling flows
        - `type` 'ordinary' | 'long_running', required — Flow template type
        - `graph` object, required — Recipe graph representing component connections
          - `nodes` union[], required
            - union
              - …
          - `edges` object[], required
            - `config` object
              - …
      - `created_at` string, required
      - `updated_at` string, required
      - `version` number
    - `relationships` object, required
      - `user` object, required
        - `data` object, required
          - `id` string, required — User ID
          - `type` 'user', required
        - `links` object, required
          - `self` string, required
      - `workspace` object, required
        - `data` object, required
          - `id` string, required — Workspace ID
          - `type` 'workspace', required
        - `links` object, required
          - `self` string, required
      - `contract` object, required
        - `data` object, required
          - `id` string, required — Contract ID
          - `type` 'contract', required
        - `links` object, required
          - `self` string, required

## Other responses

- `201` — Created (when recipe is created)
- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
