> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Trigger configured Flowla automations on a room.

## Endpoints

| Method | Path                                  | Description                   |
| ------ | ------------------------------------- | ----------------------------- |
| `POST` | `/api/v2/workflows/{workflow_id}`     | Trigger a workflow            |
| `POST` | `/api/v2/workflows/{workflow_id}/raw` | Trigger a workflow (raw body) |

***

## Trigger a workflow

`POST /api/v2/workflows/{workflow_id}`

Triggers a configured automation. The request body is wrapped in a `data` object.

<ParamField body="data" type="object" required>
  Arbitrary key-value data passed to the workflow.
</ParamField>

```json Example theme={null}
{ "data": { "roomId": "<room_id>", "stage": "kickoff" } }
```

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.flowla.com/api/v2/workflows/<workflow_id> \
    -H "x-flowla-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"data": {"roomId": "<room_id>", "stage": "kickoff"}}'
  ```

  ```python Python theme={null}
  import requests

  requests.post(
      "https://api.flowla.com/api/v2/workflows/<workflow_id>",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      json={"data": {"roomId": "<room_id>", "stage": "kickoff"}},
  )
  ```

  ```js JavaScript theme={null}
  await fetch("https://api.flowla.com/api/v2/workflows/<workflow_id>", {
    method: "POST",
    headers: {
      "x-flowla-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ data: { roomId: "<room_id>", stage: "kickoff" } }),
  });
  ```
</CodeGroup>

***

## Trigger a workflow (raw)

`POST /api/v2/workflows/{workflow_id}/raw`

Same as above but sends the full request body as workflow data — no `data` wrapper.

```json Example theme={null}
{ "roomId": "<room_id>", "stage": "kickoff" }
```

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.flowla.com/api/v2/workflows/<workflow_id>/raw \
    -H "x-flowla-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"roomId": "<room_id>", "stage": "kickoff"}'
  ```

  ```python Python theme={null}
  requests.post(
      "https://api.flowla.com/api/v2/workflows/<workflow_id>/raw",
      headers={"x-flowla-api-key": "YOUR_API_KEY"},
      json={"roomId": "<room_id>", "stage": "kickoff"},
  )
  ```

  ```js JavaScript theme={null}
  await fetch("https://api.flowla.com/api/v2/workflows/<workflow_id>/raw", {
    method: "POST",
    headers: {
      "x-flowla-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ roomId: "<room_id>", stage: "kickoff" }),
  });
  ```
</CodeGroup>
