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

# Introduction

> Everything you need to start building with the FormFlows.ai REST API.

The FormFlows.ai REST API lets you manage forms, retrieve submissions, configure workflows, and register webhooks — all programmatically. Use it to embed FormFlows.ai into your product, automate data pipelines, or build custom integrations.

## Base URL

All API requests go to:

```
https://api.formflows.ai/v1
```

## Request format

Every request must include two headers:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

Request bodies must be valid JSON. Responses are always JSON.

## Versioning

The current API version is **v1**, reflected in the base URL. FormFlows.ai uses URL-based versioning. When a breaking change is introduced, a new version (`/v2`) is released and the previous version is supported for a minimum of 12 months. Non-breaking additions — new optional fields, new endpoints — are added without a version bump.

<Info>
  Subscribe to the [changelog](https://formflows.ai/changelog) to be notified of deprecations before they take effect.
</Info>

## Rate limits

Limits are applied per API key, per minute.

| Plan       | Requests per minute |
| ---------- | ------------------- |
| Free       | 100                 |
| Pro        | 1,000               |
| Enterprise | Custom              |

When you exceed your limit, the API returns a `429` response. The response includes a `Retry-After` header indicating how many seconds to wait before retrying.

<Tip>
  If you need higher limits for a production workload, contact [support@formflows.ai](mailto:support@formflows.ai) about an Enterprise plan.
</Tip>

## Errors

All errors follow this structure:

```json theme={null}
{
  "error": {
    "code": "form_not_found",
    "message": "No form with that ID exists in your account.",
    "status": 404
  }
}
```

### Error codes

| HTTP status | Code                  | Description                                                                                                             |
| ----------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| 400         | `bad_request`         | The request is malformed or missing required fields.                                                                    |
| 401         | `unauthorized`        | The API key is missing or invalid.                                                                                      |
| 403         | `forbidden`           | The API key does not have permission for this action.                                                                   |
| 404         | `not_found`           | The requested resource does not exist.                                                                                  |
| 422         | `validation_error`    | The request is well-formed but fails validation (e.g., a field value is out of range).                                  |
| 429         | `rate_limit_exceeded` | You have exceeded your rate limit. Wait before retrying.                                                                |
| 500         | `internal_error`      | Something went wrong on our end. These are rare — check the [status page](https://status.formflows.ai) if they persist. |

## Pagination

List endpoints use cursor-based pagination. Pass `limit` and `cursor` as query parameters. The response includes a `next_cursor` value — pass it as `cursor` on your next request to fetch the following page. When `next_cursor` is `null`, you have reached the last page.

| Parameter | Type    | Default | Description                                                                 |
| --------- | ------- | ------- | --------------------------------------------------------------------------- |
| `limit`   | integer | `20`    | Number of results per page. Maximum `100`.                                  |
| `cursor`  | string  | —       | Cursor from the previous response's `next_cursor`. Omit for the first page. |

**Example paginated response:**

```json theme={null}
{
  "data": [...],
  "next_cursor": "cur_eyJpZCI6ImZybV8wMDEiLCJkaXIiOiJuZXh0In0",
  "has_more": true
}
```

## Example request

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url "https://api.formflows.ai/v1/forms?limit=10" \
    --header "Authorization: Bearer sk_live_your_api_key" \
    --header "Content-Type: application/json"
  ```

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

  response = requests.get(
      "https://api.formflows.ai/v1/forms",
      headers={"Authorization": "Bearer sk_live_your_api_key"},
      params={"limit": 10},
  )

  forms = response.json()
  print(forms["data"])
  ```
</CodeGroup>
