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

# API Reference

> Interactive API documentation for SnackBase

## SnackBase API

Complete interactive reference for all SnackBase API endpoints. Explore endpoints, test requests, and view responses directly from your browser.

<Note>
  Use the API playground on the right to test requests. You can switch between development and production environments using the selector above.
</Note>

### Base URL

| Environment | URL                         |
| ----------- | --------------------------- |
| Development | `http://localhost:8000`     |
| Production  | `https://api.snackbase.dev` |

### Authentication

Most endpoints require authentication using a Bearer token:

```bash theme={null}
Authorization: Bearer <your_token>
```

### Response Format

All responses return JSON:

```json theme={null}
{
  "data": {},
  "message": "Success"
}
```

### Error Responses

Errors follow this format:

```json theme={null}
{
  "error": "Error type",
  "message": "Detailed error message"
}
```

### Quick Links

* [Authentication](/api-reference/auth) - Login, register, OAuth, SAML
* [Accounts & Users](/api-reference/accounts) - Manage accounts and users
* [Collections](/api-reference/collections) - Create and manage collections
* [Records](/api-reference/records) - CRUD operations for records
* [Roles](/api-reference/roles) - Role-based access control
* [Permissions](/api-reference/permissions) - Fine-grained permissions
