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

# Errors

> Error codes and response format for the Selcor Partner API.

All errors return a consistent JSON structure with an HTTP status code.

```json theme={null}
{
  "error": {
    "code": "error_code",
    "message": "Human-readable description",
    "detail": {}
  },
  "request_id": "req_abc123"
}
```

## HTTP Status Codes

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| `400`  | Bad request — invalid parameters or body                 |
| `401`  | Unauthorized — missing or invalid API key                |
| `403`  | Forbidden — insufficient permissions                     |
| `404`  | Not found — resource does not exist or is not accessible |
| `409`  | Conflict — resource already exists                       |
| `422`  | Unprocessable — validation passed but operation failed   |
| `500`  | Internal error                                           |

## Common Error Codes

| Code                   | Description                             |
| ---------------------- | --------------------------------------- |
| `unauthorized`         | Missing or invalid API key              |
| `forbidden`            | API key lacks required permission       |
| `not_found`            | Resource not found                      |
| `validation_error`     | Request body failed schema validation   |
| `credential_not_found` | Relay credential does not exist         |
| `tier_mismatch`        | Relay instruction exceeds declared tier |
| `engine_error`         | Relay browser automation failed         |

## Pagination

List endpoints use cursor-based pagination:

```json theme={null}
{
  "data": [...],
  "pagination": {
    "has_more": true,
    "next_cursor": "clxyz..."
  },
  "request_id": "req_abc123"
}
```

Pass `cursor` and `limit` (1-100, default 25) as query parameters:

```bash theme={null}
curl "https://api.selcor.ai/v1/workspaces?limit=10&cursor=clxyz..."
```
