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

# API overview

> Authentication, base URL, request format, response format, pagination, and error codes for the Feedal REST API.

The Feedal REST API lets you manage forms, read responses, and control integrations programmatically. All requests use HTTPS and return JSON.

***

## Base URL

```
https://api.feedal.com/api/
```

All endpoint paths in this documentation are relative to this base URL.

***

## Authentication

Authenticated endpoints require a **Bearer token** in the `Authorization` header. Obtain a token by creating an API key in the dashboard (**Developers → API Keys**).

```http theme={null}
Authorization: Bearer sk_live_your_api_key_here
```

**Public respondent endpoints** (starting `/v2/r/`) do not require authentication — they are open for embedding in your front-end.

***

## Request format

Send JSON bodies with `Content-Type: application/json`:

```http theme={null}
POST /api/v2/form/ HTTP/1.1
Host: api.feedal.com
Authorization: Bearer sk_live_your_api_key_here
Content-Type: application/json

{
  "title": "Customer feedback"
}
```

***

## Response format

Successful responses return JSON. List endpoints use a paginated envelope:

```json theme={null}
{
  "count": 100,
  "next": "https://api.feedal.com/api/v2/form/?limit=20&offset=20",
  "previous": null,
  "results": [ ... ]
}
```

Single-resource endpoints return the object directly (no envelope).

***

## Pagination

All list endpoints support cursor-based pagination via query parameters:

| Parameter | Default | Description                |
| --------- | ------- | -------------------------- |
| `limit`   | `20`    | Results per page (max 100) |
| `offset`  | `0`     | Number of results to skip  |

***

## Filtering and sorting

| Parameter  | Description                                                         |
| ---------- | ------------------------------------------------------------------- |
| `ordering` | Field to sort by — prefix with `-` for descending (e.g. `-created`) |
| `search`   | Full-text search on supported fields                                |

Endpoint-specific filters are documented on each endpoint page.

***

## Error responses

All errors return a JSON body with a `detail` field:

```json theme={null}
{
  "detail": "Authentication credentials were not provided."
}
```

Validation errors may include an `errors` array:

```json theme={null}
{
  "detail": "Validation error.",
  "errors": ["title: This field is required."]
}
```

### HTTP status codes

| Code  | Meaning                                         |
| ----- | ----------------------------------------------- |
| `200` | OK                                              |
| `201` | Created                                         |
| `204` | No content (successful delete)                  |
| `400` | Bad request — validation error or missing field |
| `401` | Unauthorized — missing or invalid API key       |
| `403` | Forbidden — you don't own this resource         |
| `404` | Not found                                       |
| `409` | Conflict — e.g. slug collision                  |
| `500` | Server error                                    |

***

## API key management

See [API keys](/account/api-keys) for how to create, rotate, and revoke keys.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Forms" icon="file-text" href="/developer/api-reference/forms">
    List, create, update, and publish forms.
  </Card>

  <Card title="Sessions & responses" icon="table" href="/developer/api-reference/sessions">
    Read respondent sessions and their answers.
  </Card>
</CardGroup>
