Getting started
Base URL:https://core.ravenna.ai/api
Authentication: Include your API key in the x-ravenna-api-token header with every request.
Example request:
Authentication
Create an API key
- Navigate to Settings in your Ravenna workspace
- Select API Keys from the sidebar
- Click Create API Key
- Optionally add one or more Allowed IP ranges in CIDR notation to restrict where the key can be used from. See Restrict a key to specific IP ranges.
- Copy your key and store it securely
Use your API key
Include your API key in thex-ravenna-api-token header with every request:
Authenticate via query parameter
For environments where you cannot set custom HTTP headers, such as browser-based access, embedded links, or webhook receivers, pass your API key as theapiKey query parameter instead:
Restrict a key to specific IP ranges
You can pin an API key to one or more IP ranges so requests from any other address are rejected. Use this to lock a key to your office network, a NAT gateway, a bastion host, or a specific CI runner. When to use IP restrictions:- The key is used by a system with a stable, well-known egress IP (a CI job, a scheduled worker, a customer’s on-prem integration).
- You want a stolen key to be unusable outside your network even before you notice and revoke it.
- Your security policy requires network-level scoping in addition to key-level authentication.
- On the Create API Key dialog, add each range to Allowed IP ranges and press Enter.
- Leave the list empty to make the key usable from any IP address (existing keys are unrestricted by default).
- Go to Settings > API Keys.
- Open the key’s menu and select Edit IP ranges.
- Add or remove ranges, then save. Changes take effect immediately.
- IPv4 with a prefix length, for example
203.0.113.0/24or198.51.100.42/32for a single address. - IPv6 with a prefix length, for example
2001:db8::/32or2001:db8::1/128. - IPv4-mapped IPv6 addresses (
::ffff:203.0.113.50) are compared as IPv4, so a caller arriving over a dual-stack listener matches an IPv4 range. /0is rejected — it would match every address, which is what an empty list already means.
CloudFront-Viewer-Address header, which CloudFront sets itself and a client cannot spoof. If your traffic passes through your own proxy or egress gateway before reaching Ravenna, add that gateway’s public egress IP to the allowlist, not the internal client’s address.
Failure mode:
A request from an address outside the allowlist is rejected with 403 Forbidden and no WWW-Authenticate header. The response body does not reveal that the key is IP-scoped — the same status is returned when the caller IP cannot be established at all — so a stolen key learns nothing about the restriction. The reason is recorded in Ravenna’s server logs.
Two related behaviors changed alongside IP-restricted keys and apply to every workspace, restricted or not: audit events on the API key surface record the real caller IP rather than the load balancer’s, and per-key rate limits are counted per real client instead of shared across every caller behind the load balancer.
Monitor API key usage
The API Keys settings page shows a Last used timestamp for each key. Use this to:- Identify unused or stale keys that can be safely revoked
- Verify that integrations are actively using their assigned keys
Revoke an API key
To revoke an API key:- Go to Settings > API Keys
- Find the key you want to revoke
- Click the Revoke button
Finding resource IDs
Most write endpoints reference other resources by ID (for example,assigneeId, queueId, workspaceId, or a custom field ID). IDs are not shown in the Admin. Look them up with the matching list endpoint, then reuse the id value in your next request.
Common lookups:
- Users (for
assigneeId,requesterId,approverIds): callGET /users. Narrow the result with thesearch,email, orworkspaceIdquery parameters, then copy theidfield from the user you want. - Workspaces (for
workspaceId): callGET /workspacesto list every workspace your API key can access. - Queues (for
queueId): callGET /queues, optionally filtered byworkspaceId. - Forms, statuses, tags, and custom fields: call the matching list endpoint (for example,
GET /forms,GET /statuses,GET /tags) and copy theidof the entry you need. - Statuses (for
statusIdon ticket create or update): status IDs are per-workspace and are not fixed enums. CallGET /statusesto list your workspace’s statuses (both system statuses like Open, In Progress, Waiting, Done, and Closed, and any custom sub-statuses), then use theidof the status you want to set.
Making requests
Response format
All responses return JSON with aContent-Type: application/json header. The response body contains the resource data directly, without a top-level data wrapper.
Successful responses return the requested resource. The example below shows a queue response, but the fields differ by endpoint. For example, GET /queues/{id} returns queue fields (id, name, status, and so on), while GET /users/{id} returns user fields. Refer to the endpoint’s reference page for the full field list.
code is a stable machine-readable string you can branch on, and message is a human-readable description that may change:
Response shape for ticket lists
Ticket list endpoints (GET /tickets, and related list endpoints that accept a responseType query parameter) support a responseType value that controls how much detail each ticket includes. The response shape is otherwise the same.
default(used whenresponseTypeis omitted): returns each ticket with its standard fields and expanded relations, such as the ticket’s queue name, status object, tags, and other embedded resources.thin: returns the same set of top-level ticket fields, but embedded relations are collapsed to their IDs only. Usethinwhen you are listing many tickets and only need identifiers plus core scalar fields, for example when building a dashboard, exporting data, or feeding another system that will fetch full details on demand.
thin, fetch the related record separately with its own endpoint (for example, GET /queues/{id} or GET /statuses).
Rate limits
The API enforces rate limits to ensure fair usage. If you exceed the limit, you’ll receive a
429 Too Many Requests response. Wait before retrying your request.Common error codes
Every error response uses the JSON envelope shown in Response format. The HTTP status maps to the following categories:400 Bad Request: Request body or query parameters are malformed or missing required fields401 Unauthorized: Invalid or missing API key403 Forbidden: Valid API key but insufficient permissions for the requested action404 Not Found: Resource does not exist or is not visible to your API key409 Conflict: Request conflicts with the current state of the resource (for example, a duplicate)422 Unprocessable Entity: Request is well-formed but fails validation429 Too Many Requests: Rate limit exceeded, wait before retrying500 Internal Server Error: Server error, contact support if persistent