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

# FormBharo REST API Reference: Overview and Auth Guide

> Overview and authentication guide for the FormBharo REST API, organised into Agents, Calls, Analytics, and Workspaces. Base path is /api/v1.

export const FORMBHARO_URL = "https://api.formbharo.artpark.ai";

The FormBharo REST API is organised into resource groups: Agents, Calls, Analytics, and Workspaces. All endpoints are under `/api/v1` on your FormBharo server, with one exception: `POST /offer`, the WebRTC signalling path, which lives at the bare root.

## Authentication

Every request must include an `Authorization` header with your API key:

```http theme={null}
Authorization: Bearer fb_live_0123456789ab_...
```

Four routes are open and require no API key:

| Route                                                                       | Purpose                             |
| --------------------------------------------------------------------------- | ----------------------------------- |
| `POST /offer`                                                               | WebRTC signalling (browser SDK)     |
| `GET /api/v1/data/{agent_id}/{conversation_id}`                             | Fetch collected form data           |
| `PATCH /api/v1/agents/{agent_id}/conversations/{conversation_id}/form_data` | Write form data from a call         |
| `GET /api/v1/agents/{agent_id}/public`                                      | Read agent title and questions list |

<Note>
  Keep your API key secret. Never embed it in client-side JavaScript or expose it in a public repository. Rotate it immediately if it is compromised.
</Note>

## Base URL

Every example in this reference uses this address.

```text theme={null}
{FORMBHARO_URL}
```

All API paths are then appended after this base. For example:

```text theme={null}
{FORMBHARO_URL}/api/v1/agents
```

## Resource Groups

<CardGroup cols={2}>
  <Card title="Agents" icon="robot" href="/api-reference/agents/get-agents">
    Create, read, update, delete, and publish agents. Manage access lists and move agents between workspaces
  </Card>

  <Card title="Calls" icon="phone" href="/api-reference/analytics/list-all-conversations">
    Read conversations, retrieve collected answers, and download full call transcripts
  </Card>

  <Card title="Analytics" icon="chart-bar" href="/api-reference/analytics/get-agent-analytics">
    Query completion rates, average call duration, and per-agent cost breakdowns
  </Card>

  <Card title="Workspaces" icon="folder" href="/api-reference/workspaces/get-workspaces">
    Manage workspace membership, roles, and settings across your organisation
  </Card>
</CardGroup>
