---
title: "Update a Recipe visibility based on the specified Recipe Id"
method: PATCH
path: "/recipes/{recipe_id}/visibility"
tags: ["recipes"]
---

# Update a Recipe visibility based on the specified Recipe Id

`PATCH /recipes/{recipe_id}/visibility`

Accessing and sharing recipes:

The recipe has an attribute ``visibility``, which indicates how the recipe is shared by other clients. A shared recipe
is available to other users for their Flows. There are four sharing modes:

- ``workspace`` – Only Workspace members can use the recipe.
- ``contract`` – Members of all Contract Workspaces can use the recipe.
- ``tenant`` – Recipe is available to other clients in the tenant.
- ``global`` – Any user of the platform can use these recipes.

Accordingly, a set of recipes available for each user consists of: non-shared recipes from the user's Workspace,
recipes with `contract`, `tenant` and `global` access. When you create a recipe, it has default visibility `workspace`.

You can upgrade or downgrade recipe visibility.

This request is authorized depend on specified visibility level for a user that has next permission:
- to `tenant` if user has permission `tenant.recipe.edit_visibility_tenant`
- to `global` if user has permission `global.recipe.edit_visibility_global`
- to `contract` if user has permission `workspaces.recipe.edit`
- to `workspace` if user has permission `workspaces.recipe.edit`

## Path parameters

- `recipe_id` string, required

## Request body

- object
  - `data` object, required
    - `visibility` 'workspace' | 'contract' | 'tenant' | 'global', required — Recipe sharing mode. Value must be one of `workspace`, `contract`, `tenant` or `global`

## Response `200`

OK

- 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

- `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)
