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

# Analytics

> Retrieve rich engagement data for a room: progress, assignees, and per-section/step viewership.

## Endpoints

| Method | Path                                | Description        |
| ------ | ----------------------------------- | ------------------ |
| `GET`  | `/api/v2/rooms/{room_id}/analytics` | Get room analytics |

***

## Get room analytics

`GET /api/v2/rooms/{room_id}/analytics`

Returns engagement data for the room: overall progress, the internal company, all assignees (internal and external), and a breakdown of viewership per section, step, and action.

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

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

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

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

### Response fields

<ResponseField name="title" type="string">
  Room title.
</ResponseField>

<ResponseField name="progressPercentage" type="number">
  Overall completion percentage (0–100).
</ResponseField>

<ResponseField name="internalCompany" type="object">
  `{ type, name }` of the owning organization.
</ResponseField>

<ResponseField name="assignees" type="array">
  Everyone on the room — internal team members and external contacts.

  <Expandable title="Assignee fields">
    <ResponseField name="belongsTo" type="string">
      `internal_organization` or `external_organization`.
    </ResponseField>

    <ResponseField name="email" type="string">
      Assignee email.
    </ResponseField>

    <ResponseField name="name" type="string">
      Full name.
    </ResponseField>

    <ResponseField name="title" type="string">
      Job title.
    </ResponseField>

    <ResponseField name="isRoomOwner" type="boolean">
      Present on internal assignees. `true` if this person owns the room.
    </ResponseField>

    <ResponseField name="isPrimaryContact" type="boolean">
      Present on external assignees.
    </ResponseField>

    <ResponseField name="lastSeen" type="string">
      ISO 8601 timestamp. Present on external assignees.
    </ResponseField>

    <ResponseField name="viewCount" type="number">
      Total visits. Present on external assignees.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="sections" type="array">
  Per-section analytics.

  <Expandable title="Section fields">
    <ResponseField name="id" type="string">Section ID.</ResponseField>
    <ResponseField name="title" type="string">Section title.</ResponseField>
    <ResponseField name="isCompleted" type="boolean">Whether the section is marked complete.</ResponseField>
    <ResponseField name="isVisibleToExternal" type="boolean">Whether buyers can see this section.</ResponseField>

    <ResponseField name="steps" type="array">
      Page-level viewership. Each entry has `id`, `title`, `isVisibleToExternal`, and a `viewership` array with `durationInSeconds`, `timesViewed`, `engagements`, and the `user` who viewed it.
    </ResponseField>

    <ResponseField name="actions" type="array">
      Action-plan items with analytics. Each includes `id`, `title`, `status`, `description`, `internal`, `assignees`, `dueDate`, `isOverdue`, `isVisibleToExternal`, `actionType`, and `viewership`.
    </ResponseField>
  </Expandable>
</ResponseField>

<Accordion title="Example response">
  ```json theme={null}
  {
    "title": "Flowla <> Acme",
    "progressPercentage": 14.29,
    "internalCompany": { "type": "internal", "name": "Flowla" },
    "assignees": [
      {
        "belongsTo": "internal_organization",
        "email": "jordan@flowla.com",
        "name": "Jordan Avery",
        "title": "Account Executive",
        "isRoomOwner": true
      },
      {
        "belongsTo": "external_organization",
        "email": "morgan.lee@acme.com",
        "name": "Morgan Lee",
        "title": "VP of Operations",
        "isPrimaryContact": true,
        "lastSeen": "2026-05-05T14:30:44.260Z",
        "viewCount": 4
      }
    ],
    "sections": [
      {
        "id": "e6136fc8-0036-472c-886d-5f4089f22af0",
        "title": "Welcome",
        "isCompleted": false,
        "isVisibleToExternal": true,
        "steps": [
          {
            "id": "14968206-ac51-4da1-9846-8b6b85a10edf",
            "title": "Introduction",
            "isVisibleToExternal": true,
            "viewership": [
              {
                "user": {
                  "belongsTo": "external_organization",
                  "email": "morgan.lee@acme.com",
                  "name": "Morgan Lee",
                  "isPrimaryContact": true,
                  "lastSeen": "2026-05-05T14:30:44.260Z",
                  "viewCount": 4
                },
                "durationInSeconds": 144,
                "timesViewed": 1,
                "engagements": [
                  { "type": "TASK_COMPLETED", "createdAt": "2026-05-05T14:30:54.168Z" }
                ]
              }
            ]
          }
        ],
        "actions": [
          {
            "id": "7e06cab8-4bf6-49ca-a1c6-f49893ae28c2",
            "title": "Sign mutual NDA",
            "status": "in_progress",
            "description": "Review and countersign the NDA before kickoff",
            "internal": false,
            "dueDate": "2026-05-11T22:00:00.000Z",
            "isOverdue": true,
            "isVisibleToExternal": true,
            "actionType": "fill-form",
            "assignees": [
              {
                "type": "user",
                "user": {
                  "belongsTo": "internal_organization",
                  "email": "delia@flowla.com",
                  "name": "Delia Barbat",
                  "isRoomOwner": false
                }
              }
            ],
            "viewership": [
              {
                "user": {
                  "belongsTo": "external_organization",
                  "email": "morgan.lee@acme.com",
                  "name": "Morgan Lee",
                  "isPrimaryContact": true,
                  "lastSeen": "2026-05-05T14:30:44.260Z",
                  "viewCount": 4
                },
                "durationInSeconds": 3,
                "timesViewed": 1,
                "engagements": []
              }
            ]
          }
        ]
      }
    ]
  }
  ```
</Accordion>
