---
title: "Share Workflow"
method: PATCH
path: "/api/v1/workflows/{workflow_id}/shares"
tags: ["Workflows"]
---

# Share Workflow

`PATCH /api/v1/workflows/{workflow_id}/shares`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/workflows/{workflow_id}/shares`
- Auth: HTTP bearer

Shares the workflow with members of your organization and stops sharing it with others, in one call. Sharing a workflow gives edit access, and it appears in their workflow list.

Only the workflow's owner and org admins can do this. People in `add` who already have it, and the owner, are reported in `data.skipped`; people in `remove` who did not have it are ignored. Read the current list from Get Workflow Overview (`shared_users`).

A refusal changes nothing; its `code` says why, and `emails` lists any refused addresses.

## Path parameters

- `workflow_id` string, required

## Request body

- object
  - `add` string[]: Email addresses to share with. They must be current members of your organization.
  - `remove` string[]: Email addresses to stop sharing with. Former members can be removed too.

## Response `200`

Default Response

- object
  - `status` integer
  - `message` string
  - `data` object
    - `workflow_id` string
    - `owner_email` string
    - `shared_users` string[]: Everyone the workflow is shared with, after this call.
    - `added` string[]: Newly shared with.
    - `skipped` string[]: The owner, and people who already had it.
    - `removed` string[]: No longer shared with.

## Other responses

- `400`: Bad Request — invalid body, or a refused change (`code` + `emails`)
- `401`: Unauthorized — missing or invalid API key
- `403`: Forbidden. `code` says which permission refused: ROLE_FORBIDDEN (your role), INSUFFICIENT_SCOPE (the API key's scopes), WORKFLOW_FORBIDDEN (no access to the workflow), KEY_WORKFLOW_FORBIDDEN (the API key's workflow restriction). SHARE_FORBIDDEN: you can open the workflow but are not its owner or an org admin.
- `404`: Workflow not found
- `429`: Too Many Requests — rate limit exceeded. Check `Retry-After` header for seconds until the limit resets.

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
