Cerber
All guides
Guides

Cerber REST API

Read your workspace’s licence usage with a single authenticated request. Use the same API reference to choose the next operation for your integration.

Before you start

  • Access to API keys in your Cerber workspace
  • Permission to grant org:read
  • An HTTP client and a place to store the key securely
On this page

Issue a key for this integration

Open API keys in the developer area. For a reporting script, start with an organisation read permission. The key inherits the limits of the administrator who creates it.

  1. Choose a recognisable name and a suitable expiry date. Select org:read for this example. If Cerber asks you to reconfirm your login, finish that step in the cabinet.
  2. Review any account limits, then create the key. The full secret is shown once. Save it in your development environment’s secret store.
  3. Set CERBER_API_KEY from the stored secret for the shell that will run the request below. Keep the key out of client-side code and chat messages.

A Developer token for an MCP archive connection is a separate credential. To retrieve the content of Telegram messages for an assistant, use the archive tools.

For the first read, this key requests only organisation information.

Make your first request

GET /v1/organization returns the workspace associated with the key. It requires org:read. There is no request body, organisation ID or query parameter. The API base URL is https://admin.getcerber.com/v1.

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $CERBER_API_KEY" \
  -H "Accept: application/json" \
  "https://admin.getcerber.com/v1/organization"

Check which workspace answered

A successful call returns HTTP 200 and a JSON organisation object. Compare id and name with your workspace. In this example, nine of twelve seats are in use. These are selected fields from an illustrative response.

{
  "object": "organization",
  "id": "northwind",
  "name": "Northwind Trading",
  "status": "active",
  "seats": {
    "limit": 12,
    "used": 9,
    "reserved": 0,
    "free": 3
  },
  "archive": {
    "key_set": true,
    "plan": true,
    "readable": true,
    "writable": true,
    "phase": "active"
  }
}

archive.readable and archive.writable describe the workspace’s archive entitlement. Permissions on the calling connection still determine which operations it can perform.

Pick the next method

These read-only methods come from Cerber’s OpenAPI definition. Open the full schema for every operation, its required inputs, response examples and errors. The x-scope and x-permission fields identify the broad scope and the specific permission checked.

MethodRequired scopeUseful result
GET /v1/organizationorg:readOrganisation identity, plan, seat usage and archive state.
GET /v1/accountsorg:readVisible accounts in data. Filter by status or department_id.
GET /v1/departmentsorg:readDepartments visible to the caller.
GET /v1/ai-connectionsorg:readConnection and API key records the caller can see. Secret values are omitted.
GET /v1/journalorg:readA page of workspace events the caller can see.
GET /v1/archive/rulesarchive:readThe organisation’s archive saving rules.

Continue a list without skipping a page

For GET /v1/accounts, request a page using limit from 1 to 100. If has_more is true, use the last item’s id as starting_after and keep the filters from the previous request. Stop when has_more is false. The journal uses before_id for its next older page.

GET /v1/accounts?limit=20
GET /v1/accounts?limit=20&starting_after=<last-account-id>

Cerber limits REST and management operation calls per credential. Read the RateLimit-Remaining and RateLimit-Reset headers. For HTTP 429, honour Retry-After before retrying.

Tell a credential problem from a missing permission

An error has an HTTP status and a JSON error object. Inspect error.code before retrying. This example is the response for a credential without org:read.

{
  "error": {
    "type": "permission_error",
    "code": "insufficient_scope",
    "message": "This credential does not have the org:read scope. Issue an API key with it, or reconnect and approve it."
  }
}
HTTP statusWhat to check
400Inspect error.param and the method’s schema for a required or invalid field.
401Check the Bearer header and whether the credential has expired or was revoked.
403Check the required scope, administrator role and any account limits. Grant only the permission this operation needs.
404Check the ID and the account selection. A resource outside your access can also return 404.
429Wait for the interval in Retry-After before sending another request.

Rotate or revoke the key

When retiring an integration, revoke its key in the developer area, then remove the stored secret. To rotate a key in a running integration, issue a replacement with the same minimal permissions, test it with GET /v1/organization, switch the integration, then revoke the old key.

Requests with a revoked key are refused. Keep the status, error code and Request-Id if you contact support. Leave the Authorization header and secret out of the report.

Check the result

Your integration received HTTP 200 from GET /v1/organization and the returned id matches the workspace you intended to read.