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

# Response format

> JSON shapes for single resources, collections, paginated lists, and errors.

All responses are JSON with `Content-Type: application/json`.

## Single resource

```json theme={null}
{
  "id": "lead_f0a3...",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "...": "..."
}
```

The body is the resource itself, with no wrapping envelope. Fields you don't set come back as `null` (not omitted), so destructuring is safe.

## Collection (non-paginated)

For endpoints that return a fixed-size catalog (event types, lead sources, pipeline stages):

```json theme={null}
{
  "data": [
    { "id": "website", "name": "website" },
    { "id": "meta", "name": "meta" }
  ]
}
```

## Paginated list

For list endpoints:

```json theme={null}
{
  "data": [ /* array of resources */ ],
  "pagination": {
    "total": 327,
    "limit": 50,
    "offset": 0,
    "hasMore": true
  }
}
```

See [Pagination](/pagination) for how to walk through pages.

## Error

```json theme={null}
{
  "error": {
    "message": "You have reached the maximum number of leads for your plan. Please upgrade to create more leads.",
    "code": "FORBIDDEN"
  }
}
```

The HTTP status and the `error.code` are always consistent (e.g. `403` ↔ `FORBIDDEN`, `404` ↔ `NOT_FOUND`). See the full table in [Errors](/errors).

## Timestamps

All timestamps are ISO 8601 strings in UTC, e.g. `"2026-04-29T18:04:15.000Z"`. Parse them in your language's standard library — they always include the `Z` suffix and millisecond precision.

## IDs

Resource IDs are opaque strings. Don't try to parse them or assume a particular format — they may change in future versions.
