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

# API Reference

> Complete REST API reference for external integrations

## Base URL

All API requests go to:

```
https://api.usegately.com/api/v1
```

## Authentication

Every request must include your API key as a Bearer token:

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

Get your API key from **Dashboard → Settings → API Keys**.

The API key identifies your project automatically — no `X-Project-ID` header needed.

<Note>
  Legacy `/sdk/*` paths still work but are deprecated. Use `/api/v1/*` for all new integrations.
</Note>

## Response format

All endpoints return JSON. Successful responses include a `success: true` field. Errors always include an `error` string.

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

// Error
{ "error": "Member not found", "code": "NOT_FOUND" }
```

## Status codes

| Code  | Meaning                                   |
| ----- | ----------------------------------------- |
| `200` | OK                                        |
| `201` | Created                                   |
| `400` | Bad request — check your request body     |
| `401` | Unauthorized — invalid or missing API key |
| `403` | Forbidden — insufficient permissions      |
| `404` | Not found                                 |
| `429` | Rate limited                              |
| `500` | Server error                              |

## Rate limits

* **300 requests / minute** per API key
* Bulk endpoints (campaigns, imports) count as 1 request regardless of recipient count
* Rate limit headers returned on every response: `X-RateLimit-Remaining`, `X-RateLimit-Reset`
