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

# API overview

> Everything you need to start integrating with the scaling.cloud REST API.

The scaling.cloud API is a REST API at `https://api.scaling.cloud/v1`. Use it to manage incidents, on-call schedules, escalation policies, and team members programmatically — from CI/CD pipelines, Terraform, or any HTTP client.

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/authentication">
    API key format, setup, and security practices.
  </Card>

  <Card title="Errors" icon="circle-exclamation" href="/api/errors">
    Error shapes, types, codes, and HTTP status codes.
  </Card>

  <Card title="Incidents" icon="triangle-exclamation" href="/api/incidents/list">
    Create, list, and update incident status.
  </Card>

  <Card title="On-call schedules" icon="calendar" href="/api/oncall/schedules">
    Manage rotation schedules and layers.
  </Card>

  <Card title="Escalation policies" icon="arrow-up-right-dots" href="/api/escalation/policies">
    Define ordered escalation steps for incidents.
  </Card>

  <Card title="Team" icon="users" href="/api/team/members">
    List and manage organization members.
  </Card>
</CardGroup>

## Base URL

All API endpoints are relative to:

```
https://api.scaling.cloud/v1
```

## Request format

All requests and responses use JSON. Set `Content-Type: application/json` on every request that includes a body.

```bash theme={null}
Content-Type: application/json
```

## Authentication

Every request must include a valid API key in the `Authorization` header:

```
Authorization: Bearer scl_live_<token>
```

See [Authentication](/authentication) for how to obtain and use API keys.

## Example request

```bash theme={null}
curl --request GET \
  --url https://api.scaling.cloud/v1/oncall/schedules \
  --header 'Authorization: Bearer scl_live_your_api_key_here' \
  --header 'Content-Type: application/json'
```

## Request IDs

Every API response includes a `requestId` field — a UUID that uniquely identifies the request. Include this value when contacting support so the scaling.cloud team can locate the relevant logs.

```json theme={null}
{
  "statusCode": 404,
  "type": "invalid_request_error",
  "code": "not_found",
  "requestId": "550e8400-e29b-41d4-a716-446655440000"
}
```

## Resource IDs

All resource IDs (incidents, schedules, layers, policies) are UUIDs. IDs never change after creation and are stable across updates — you can safely store them as long-lived references in external systems such as Terraform state.

## Timestamps

All timestamps are [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) strings in UTC, for example: `2026-01-01T00:00:00.000Z`.

## Pagination

List endpoints use cursor-based pagination. Each response that has more results includes a `nextCursor` string. Pass that value as the `cursor` query parameter to retrieve the next page.

<ParamField query="cursor" type="string">
  Opaque cursor returned by the previous response. Omit to start from the first page.
</ParamField>

<ParamField query="limit" type="number" default="20">
  Number of results per page. Accepted range: 1–100.
</ParamField>

**Example paginated response:**

```json theme={null}
{
  "data": [...],
  "nextCursor": "eyJpZCI6IjEyMyJ9"
}
```

When `nextCursor` is absent or `null`, you have reached the last page.

**Fetching the next page:**

```bash theme={null}
curl --request GET \
  --url 'https://api.scaling.cloud/v1/incidents?limit=20&cursor=eyJpZCI6IjEyMyJ9' \
  --header 'Authorization: Bearer scl_live_your_api_key_here'
```

## Errors

All error responses follow a consistent shape with a `type`, a `code`, and the request's `requestId`. See [Errors](/api/errors) for the full reference.
