# API reference

> Every endpoint: what it does, the permission it needs, its parameters, and an example in curl, JavaScript and Python.

Type: Reference. Updated 2 December 2026. Page: https://www.colossium.cloud/docs/api

## Before you start

|  |  |
| --- | --- |
| Base URL | `https://api.colossium.cloud/v1` |
| Authentication | `Authorization: Bearer <token>`. [Authentication](/docs/authentication) |
| Format | JSON. `Content-Type: application/json` when you send a body |
| Machine-readable | [`/v1/openapi.json`](https://api.colossium.cloud/v1/openapi.json) |

Each endpoint below shows the permission (scope) it needs. A token without it gets `403 insufficient_scope`. Examples use made-up ids and the address `example.org`. Replace `$COLOSSIUM_API_TOKEN` with your own token, kept in the environment.

## Token

### GET /token/verify

Check a token. Returns what the token is and what it can do right now. Its effective scopes are its granted scopes limited to what its creator’s role allows today.

Any valid token.

```bash
curl "https://api.colossium.cloud/v1/token/verify" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "id": "d41e8f06-92ab-4c37-b5e1-0a7c36d92e18",
  "name": "Release pipeline",
  "status": "active",
  "organisation_id": "7a1c4e92-0b3d-4f58-8a26-5e9d1c7b3f04",
  "token": "clsm_4kT9...x7Qa",
  "scopes": [
    "resource.read",
    "resource.write"
  ],
  "granted_scopes": [
    "resource.read",
    "resource.write",
    "audit.read"
  ],
  "project_ids": null,
  "expires_at": "2027-03-02T09:30:00.000000+00:00",
  "created_at": "2026-12-02T09:30:00.000000+00:00",
  "last_used_at": "2026-12-02T09:30:00.000000+00:00"
}
```

| Status | Meaning |
| --- | --- |
| 200 | The token is valid. |
| 401 | The token is missing, invalid, revoked or expired. |

## Organisation

### GET /organisation

Get the organisation. The organisation the token belongs to.

Needs the `resource.read` scope.

```bash
curl "https://api.colossium.cloud/v1/organisation" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "id": "7a1c4e92-0b3d-4f58-8a26-5e9d1c7b3f04",
  "name": "Example Trading",
  "slug": "example-trading",
  "status": "active",
  "created_at": "2026-12-02T09:30:00.000000+00:00"
}
```

| Status | Meaning |
| --- | --- |
| 200 | The organisation. |

## Projects

### GET /projects

List projects. Projects in the organisation, newest first. A token limited to some projects sees only those.

Needs the `resource.read` scope.

**Query**

- `limit` (integer): How many items to return, 1 to 100. Default 25.
- `cursor` (string): The next_cursor from the previous page.

```bash
curl "https://api.colossium.cloud/v1/projects?limit=2" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "data": [
    {
      "id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
      "name": "Orders",
      "slug": "orders",
      "description": "Order processing",
      "created_at": "2026-12-02T09:30:00.000000+00:00"
    }
  ],
  "next_cursor": null
}
```

| Status | Meaning |
| --- | --- |
| 200 | A page of projects. |
| 400 | A parameter is not valid. |

### POST /projects

Create a project. Creates a project. A token that is limited to some projects cannot create new ones.

Needs the `project.write` scope.

**Body**

- `name` (string, required): 2 to 60 characters.
- `slug` (string, required): Lower case letters, numbers and single hyphens, 2 to 48 characters. Unique in the organisation.
- `description` (string): Up to 280 characters.

```bash
curl -X POST "https://api.colossium.cloud/v1/projects" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Orders","slug":"orders","description":"Order processing"}'
```

Response 201:

```json
{
  "id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
  "name": "Orders",
  "slug": "orders",
  "description": "Order processing",
  "created_at": "2026-12-02T09:30:00.000000+00:00"
}
```

| Status | Meaning |
| --- | --- |
| 201 | Created. |
| 400 | The body is not valid. |
| 403 | The token cannot create projects. |
| 409 | The slug is taken. |

### GET /projects/{id}

Get a project. One project.

Needs the `resource.read` scope.

```bash
curl "https://api.colossium.cloud/v1/projects/3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
  "name": "Orders",
  "slug": "orders",
  "description": "Order processing",
  "created_at": "2026-12-02T09:30:00.000000+00:00"
}
```

| Status | Meaning |
| --- | --- |
| 200 | The project. |
| 404 | No such project, or the token may not see it. |

## Resources

Resources are read-only. You change them by making [requests](/docs/requests).

### GET /resources

List resources. Domains, functions, databases and buckets the organisation owns, newest first.

Needs the `resource.read` scope.

**Query**

- `limit` (integer): How many items to return, 1 to 100. Default 25.
- `cursor` (string): The next_cursor from the previous page.
- `project_id` (string): Only resources in this project.
- `service` (string): Only this service, for example databases.

```bash
curl "https://api.colossium.cloud/v1/resources?project_id=3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37&service=databases" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "data": [
    {
      "id": "9b6e2d70-1c84-4a95-8f3e-6d0a5b17c2e9",
      "project_id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
      "service": "databases",
      "kind": "database",
      "name": "orders-db",
      "region": "Europe",
      "observed_status": "active",
      "drift": false,
      "last_observed_at": "2026-12-02T09:30:00.000000+00:00",
      "created_at": "2026-12-02T09:30:00.000000+00:00"
    }
  ],
  "next_cursor": null
}
```

| Status | Meaning |
| --- | --- |
| 200 | A page of resources. |
| 400 | A parameter is not valid. |

### GET /resources/{id}

Get a resource. One resource.

Needs the `resource.read` scope.

```bash
curl "https://api.colossium.cloud/v1/resources/9b6e2d70-1c84-4a95-8f3e-6d0a5b17c2e9" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "id": "9b6e2d70-1c84-4a95-8f3e-6d0a5b17c2e9",
  "project_id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
  "service": "databases",
  "kind": "database",
  "name": "orders-db",
  "region": "Europe",
  "observed_status": "active",
  "drift": false,
  "last_observed_at": "2026-12-02T09:30:00.000000+00:00",
  "created_at": "2026-12-02T09:30:00.000000+00:00"
}
```

| Status | Meaning |
| --- | --- |
| 200 | The resource. |
| 404 | No such resource, or the token may not see it. |

## Requests

### GET /requests

List requests. Requests for services, newest first.

Needs the `resource.read` scope.

**Query**

- `limit` (integer): How many items to return, 1 to 100. Default 25.
- `cursor` (string): The next_cursor from the previous page.
- `state` (string): awaiting_approval, queued, running, awaiting_verification, succeeded, failed or cancelled.
- `kind` (string): For example databases.create.
- `project_id` (string): Only requests in this project.

```bash
curl "https://api.colossium.cloud/v1/requests?state=awaiting_approval" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "data": [
    {
      "id": "c58a1f34-7e2b-4d60-9a8c-3b1e4f70d625",
      "project_id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
      "resource_id": null,
      "kind": "databases.create",
      "state": "awaiting_approval",
      "input": {
        "name": "orders-db",
        "region": "eu"
      },
      "failure": null,
      "created_at": "2026-12-02T09:30:00.000000+00:00",
      "started_at": null,
      "finished_at": null
    }
  ],
  "next_cursor": null
}
```

| Status | Meaning |
| --- | --- |
| 200 | A page of requests. |
| 400 | A parameter is not valid. |

### POST /requests

Make a request. Asks for a service to be created or changed. It goes through the same checks as a request made in the console and then waits for approval. A request with a kind that ends in .delete needs the resource.destroy scope.

Needs the `resource.write` scope.

**Headers**

- `Idempotency-Key` (string, required): 8 to 120 characters. Repeating a request with the same key returns the original, with status 200 and the header Idempotent-Replayed: true.

**Body**

- `kind` (string, required): One of dns.domain.add, dns.record.create, dns.record.delete, functions.create, functions.update, functions.delete, databases.create, databases.delete, storage.create, storage.delete. The input each one needs is in the Requests guide.
- `project_id` (string): The project it belongs to. Required for a token limited to some projects.
- `input` (object, required): What the kind needs, for example { "name": "orders", "region": "eu" } for databases.create. It is checked before the request is accepted, and a problem is reported field by field.

```bash
curl -X POST "https://api.colossium.cloud/v1/requests" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: release-2026-12-02-orders-db" \
  -d '{"kind":"databases.create","project_id":"3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37","input":{"name":"orders-db","region":"eu"}}'
```

Response 201:

```json
{
  "id": "c58a1f34-7e2b-4d60-9a8c-3b1e4f70d625",
  "project_id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
  "resource_id": null,
  "kind": "databases.create",
  "state": "awaiting_approval",
  "input": {
    "name": "orders-db",
    "region": "eu"
  },
  "failure": null,
  "created_at": "2026-12-02T09:30:00.000000+00:00",
  "started_at": null,
  "finished_at": null
}
```

| Status | Meaning |
| --- | --- |
| 201 | Accepted and waiting for approval. |
| 200 | A repeat of an earlier request. |
| 400 | The request is not valid, or the Idempotency-Key is missing. |
| 403 | The token lacks the scope, or may not use the project. |
| 409 | A plan limit has been reached. |
| 429 | Too many requests. |

### GET /requests/{id}

Get a request. One request with its progress events.

Needs the `resource.read` scope.

```bash
curl "https://api.colossium.cloud/v1/requests/c58a1f34-7e2b-4d60-9a8c-3b1e4f70d625" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "id": "c58a1f34-7e2b-4d60-9a8c-3b1e4f70d625",
  "project_id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
  "resource_id": null,
  "kind": "databases.create",
  "state": "awaiting_approval",
  "input": {
    "name": "orders-db",
    "region": "eu"
  },
  "failure": null,
  "created_at": "2026-12-02T09:30:00.000000+00:00",
  "started_at": null,
  "finished_at": null,
  "events": [
    {
      "at": "2026-12-02T09:30:00.000000+00:00",
      "kind": "awaiting_approval",
      "message": "Request received. Waiting for Colossium approval."
    }
  ]
}
```

| Status | Meaning |
| --- | --- |
| 200 | The request. |
| 404 | No such request, or the token may not see it. |

### POST /requests/{id}/cancel

Cancel a request. Withdraws a request that is awaiting approval or queued. One that has started cannot be cancelled.

Needs the `resource.write` scope.

```bash
curl -X POST "https://api.colossium.cloud/v1/requests/c58a1f34-7e2b-4d60-9a8c-3b1e4f70d625/cancel" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "id": "c58a1f34-7e2b-4d60-9a8c-3b1e4f70d625",
  "project_id": "3f2b8c1e-5d4a-4e7b-9c1d-2a6f8e0b4d37",
  "resource_id": null,
  "kind": "databases.create",
  "state": "cancelled",
  "input": {
    "name": "orders-db",
    "region": "eu"
  },
  "failure": null,
  "created_at": "2026-12-02T09:30:00.000000+00:00",
  "started_at": null,
  "finished_at": "2026-12-02T09:30:00.000000+00:00"
}
```

| Status | Meaning |
| --- | --- |
| 200 | Cancelled. |
| 404 | No such request. |
| 409 | It has already started or finished. |

## Audit events

### GET /audit-events

List audit events. The organisation’s audit log, newest first. A token limited to some projects cannot read it.

Needs the `audit.read` scope.

**Query**

- `limit` (integer): How many items to return, 1 to 100. Default 25.
- `cursor` (string): The next_cursor from the previous page.
- `action` (string): Only this action, for example api_token.create.
- `outcome` (string): success, denied or failure.

```bash
curl "https://api.colossium.cloud/v1/audit-events?action=api_token.create" \
  -H "Authorization: Bearer $COLOSSIUM_API_TOKEN"
```

Response 200:

```json
{
  "data": [
    {
      "id": 4821,
      "created_at": "2026-12-02T09:30:00.000000+00:00",
      "actor_kind": "user",
      "actor_id": "7a1c4e92-0b3d-4f58-8a26-5e9d1c7b3f04",
      "action": "api_token.create",
      "target_type": "api_token",
      "target_id": "d41e8f06-92ab-4c37-b5e1-0a7c36d92e18",
      "outcome": "success",
      "detail": {
        "name": "Release pipeline",
        "scopes": [
          "resource.read",
          "resource.write"
        ]
      }
    }
  ],
  "next_cursor": null
}
```

| Status | Meaning |
| --- | --- |
| 200 | A page of events. |
| 403 | The token lacks audit.read, or is limited to some projects. |
