REST API

The Rekor REST API provides full access to workspaces, collections, records, relationships, hooks, triggers, and batch operations. All endpoints accept and return JSON. The CLI and MCP server are both thin wrappers over this API.

Base URL

https://api.rekor.pro/v1/{workspace_id}

Most endpoints are scoped to a workspace. Token management and vault endpoints are account-level and don't require a workspace ID.

Authentication

All requests require a Bearer token in the Authorization header:

curl https://api.rekor.pro/v1/my-workspace/collections \
  -H "Authorization: Bearer rec_your_token_here"

Create tokens via the CLI (rekor tokens create) or the POST /v1/tokens endpoint. Each token is scoped by grants — workspace, collection, environment, and permission level. See Access Control for details.

Request and Response Format

All request bodies are JSON. All responses return JSON with one of two shapes:

Success — single resource

{
  "id": "01926f3a-...",
  "collection": "contacts",
  "data": { "name": "Jane Doe", "email": "jane@acme.com" },
  "created_at": "2026-03-25T10:00:00Z",
  "updated_at": "2026-03-25T10:00:00Z"
}

Success — list with pagination

{
  "data": [ ... ],
  "meta": {
    "total": 142,
    "limit": 50,
    "offset": 0
  }
}

Error

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid filter: unknown operator 'foo'",
    "details": [ ... ]
  }
}

Error Codes

HTTP StatusCodeMeaning
400VALIDATION_ERRORInvalid request body, query params, or filter syntax
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENToken lacks required permission or scope
404NOT_FOUNDResource does not exist
409CONFLICTDuplicate external_id or version conflict
429RATE_LIMITEDToo many requests — retry after Retry-After seconds
500INTERNAL_ERRORUnexpected server error

Pagination

List and query endpoints accept limit and offset parameters:

ParameterDefaultMaximum
limit501,000
offset0

The meta.total field in the response tells you the total number of matching records, so you can calculate pages.

# Page 1
GET /v1/crm/records/contacts?limit=50&offset=0

# Page 2
GET /v1/crm/records/contacts?limit=50&offset=50

Upsert Semantics

PUT endpoints are upserts. If a record with the given external_id and external_source exists, it's updated. Otherwise, a new record is created. This makes all writes idempotent — safe to retry without duplicating data.

Endpoints

SectionDescription
WorkspacesWorkspaces API endpoints
CollectionsCollections API endpoints
RecordsRecords API endpoints
RelationshipsRelationships API endpoints
AttachmentsAttachments API endpoints
HooksHooks API endpoints
TriggersTriggers API endpoints
BatchBatch API endpoints
ProvidersProviders API endpoints
EnvironmentsEnvironments API endpoints
REST API — Rekor