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

# API Introduction

> Complete API documentation for FormBnB

The FormBnB API allows you to submit forms, retrieve submissions, and manage your forms programmatically.

## Base URL

```
https://api.formbnb.com
```

## Authentication

Most endpoints require authentication via API key. Include your key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

Get your API key from the [dashboard settings](https://app.formbnb.com/dashboard/settings).

## Content Types

The API accepts and returns JSON by default. For form submissions, you can also use:

* `application/json`
* `application/x-www-form-urlencoded`
* `multipart/form-data` (for file uploads)

## Response Format

All responses are JSON:

```json theme={null}
// Success
{
  "success": true,
  "data": { ... }
}

// Error
{
  "error": "Error message",
  "code": "ERROR_CODE"
}
```

## Rate Limits

| Plan       | Requests/minute |
| ---------- | --------------- |
| Free       | 60              |
| Pro        | 300             |
| Business   | 1000            |
| Enterprise | Custom          |

Rate limit headers are included in responses:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1640000000
```

## Endpoints Overview

| Method | Endpoint                  | Description        |
| ------ | ------------------------- | ------------------ |
| POST   | `/f/{org_code}/{slug}`    | Submit form        |
| GET    | `/forms/{id}/submissions` | Get submissions    |
| GET    | `/forms/{id}/export`      | Export submissions |
| GET    | `/forms`                  | List forms         |
| POST   | `/forms`                  | Create form        |
| GET    | `/forms/{id}`             | Get form           |
| PATCH  | `/forms/{id}`             | Update form        |
| DELETE | `/forms/{id}`             | Delete form        |
| GET    | `/user`                   | Get user profile   |
| GET    | `/user/api-keys`          | List API keys      |
| POST   | `/user/api-keys`          | Create API key     |
| GET    | `/files/{id}`             | Download file      |
