> ## 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.

# API Reference

> The Flowla REST API lets you programmatically create rooms, manage content, and retrieve analytics.

## Base URL

```
https://api.flowla.com/api/v2
```

## Authentication

All requests require your API key in the `x-flowla-api-key` header. Generate API keys from your workspace under **Settings → API**.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.flowla.com/api/v2/rooms \
    -H "x-flowla-api-key: YOUR_API_KEY"
  ```

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

  headers = {"x-flowla-api-key": "YOUR_API_KEY"}
  response = requests.get("https://api.flowla.com/api/v2/rooms", headers=headers)
  ```

  ```js JavaScript theme={null}
  const res = await fetch("https://api.flowla.com/api/v2/rooms", {
    headers: { "x-flowla-api-key": "YOUR_API_KEY" },
  });
  ```
</CodeGroup>

## Pagination

List endpoints accept `page` and `limit` query parameters.

## Typical workflow

<Steps>
  <Step title="Create a room">
    `POST /api/v2/rooms` — optionally from a template or by duplicating an existing room.
  </Step>

  <Step title="Add sections">
    `POST /api/v2/sections` — create one or more sections in a single request.
  </Step>

  <Step title="Add pages">
    `POST /api/v2/pages` — create pages inside each section.
  </Step>

  <Step title="Add groups and blocks">
    `POST /api/v2/groups` then `POST /api/v2/blocks` — build page content.
  </Step>

  <Step title="Add action items">
    `POST /api/v2/action-items` — add action items to an action-plan block.
  </Step>

  <Step title="Automate">
    Register a webhook (`FLOW_COMPLETED`) or trigger workflows for follow-ups.
  </Step>
</Steps>

***

## Endpoints

<CardGroup cols={2}>
  <Card title="Rooms" icon="layer-group" href="/api/rooms">
    Create, list, retrieve, and update rooms. Supports CRM linking and duplication.
  </Card>

  <Card title="Analytics" icon="chart-line" href="/api/analytics">
    Rich engagement data per room: progress, assignees, section/step viewership.
  </Card>

  <Card title="Sections" icon="rectangle-list" href="/api/sections">
    Add and manage sections with access level control.
  </Card>

  <Card title="Pages" icon="file" href="/api/pages">
    Add and organise pages within sections, with access levels.
  </Card>

  <Card title="Groups" icon="object-group" href="/api/groups">
    Group blocks together on a page.
  </Card>

  <Card title="Blocks" icon="cube" href="/api/blocks">
    Add text, images, links, embeds, PDFs, and action-plan blocks to groups.
  </Card>

  <Card title="Action Items" icon="list-check" href="/api/action-items">
    Create and manage action items with assignees, dates, and statuses.
  </Card>

  <Card title="Workflows" icon="bolt" href="/api/workflows">
    Trigger configured automations on a room.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api/webhooks">
    Register and remove webhooks for room completion events.
  </Card>

  <Card title="Templates" icon="copy" href="/api/templates">
    List templates available in your org.
  </Card>

  <Card title="Companies" icon="building" href="/api/companies">
    List and create companies to associate with rooms.
  </Card>

  <Card title="Users" icon="user" href="/api/users">
    List organization users.
  </Card>

  <Card title="Statuses" icon="tag" href="/api/statuses">
    List room status definitions.
  </Card>
</CardGroup>
