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

# Authentication

> API key authentication and rate limits

## API key

All requests to the Classet API require an API key passed in the `X-API-KEY` header.

```bash theme={null}
curl -X GET https://api.classet.ai/v2/jobs \
  -H "X-API-KEY: your-api-key"
```

### Getting your key

1. Sign in to the [Classet dashboard](https://app.classet.ai)
2. Go to **Settings → Developers** ([app.classet.ai/settings/developers](https://app.classet.ai/settings/developers))
3. Select **Create API Key**, then copy the key

An organization can hold several API keys at once. Each key has a name and a status (`active`, `revoked` or `expired`). Use a separate key per integration so you can retire one without breaking the others.

## Rate limits and send caps

The API enforces per-organization request rate limits. If you exceed the limit, you'll receive a `429 Too Many Requests` response.

Rate limits are set per organization: a burst limit per minute and a sustained limit per hour, shared by all of the organization's API keys. Your current values are `data.limits.rate_limit_burst` and `data.limits.rate_limit_sustained` in [`GET /v2/organization`](/docs/api-reference/organization/get-organization); `null` means your organization uses the platform default. A `429` response carries `Retry-After` and `X-RateLimit-*` headers. v2 uses a separate request bucket from v1, so testing or adopting v2 cannot cause existing v1 traffic to receive a `429`. Responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Used`, `X-RateLimit-Reset`, and `X-RateLimit-Window` headers so you can pace yourself, `Retry-After` on `429`/`503`, and `X-RateLimit-Degraded: true` when the limiter was briefly unavailable and the request was not rate-limited. See [Rate limits](/docs/guides/rate-limits.md) for full semantics.

Interview outreach has an additional send cap. Calls to `POST /v2/candidates` with `send_sms` or `send_email`, `POST /v2/candidates/{candidateId}/interview`, and deprecated `POST /v2/calls` debit the same invite budget used by dashboard single-send and CSV campaign sends. The budget has four windows: `burst` (per minute), `sustained` (per hour), `daily`, and `monthly`.

When a send cap is exhausted, the API returns `429` with `error: "Interview invite limit exceeded"`, the exceeded window in `exceeded_window` (`burst`, `sustained`, `daily` or `monthly`), and a `Retry-After` header when a reset time is available.

## Error responses

All errors follow a consistent format — a human-readable `error`, a stable machine-readable `code`, and a `request_id`:

```json theme={null}
{
  "error": "Description of what went wrong",
  "code": "not_found",
  "request_id": "9f6a2c1e-4b3d-4a8e-9f2a-7c1d0e5b6a3f"
}
```

Every response also carries an `X-Request-Id` header (matching `request_id`) — include it when contacting support so we can correlate the request to our logs. See [Error handling](/docs/guides/error-handling.md) for the full `code` table and retry guidance.

### HTTP status codes

| Code | Meaning |
| - | - |
| `200` | Success |
| `201` | Created |
| `400` | Bad request — validation failed or the request can't be processed as sent |
| `401` | No API key provided |
| `402` | Free-trial interview allowance spent (`quota_exceeded`) — don't retry |
| `403` | Invalid API key, or an entitlement your organization doesn't have (a language or AI screening) |
| `404` | Resource not found |
| `409` | Conflict — duplicate, state precondition, or concurrent idempotency key |
| `422` | Unprocessable — well-formed but semantically invalid |
| `429` | Rate limit or interview-invite cap exceeded |
| `500` | Server error |
| `502` | The connected ATS failed a disqualify (`service_unavailable`) — retry once |
| `503` | `rate_limit_unavailable`: invite rate limiter temporarily unavailable, retry after `Retry-After`. `service_unavailable`: external sends aren't enabled for your organization, don't retry |

## Response envelope

All successful responses wrap data in a standard envelope:

```json theme={null}
{
  "data": { ... }
}
```

Two endpoints are the exception: `DELETE /v2/jobs/{jobId}` and `DELETE /v2/knowledge/{entryId}` return `{ "message": "..." }` with no `data`.

Paginated endpoints include metadata:

```json theme={null}
{
  "data": [ ... ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 142
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.