Docs home

API Reference

Base URL: https://api.scalekix.com/v1. Every request must include the Authorization: Bearer <api-key> header. Responses use JSON.

Authentication

Use a Scalekix API key as a bearer token for authentication. Create and manage API keys from your dashboard at Account → API Keys.

HTTP
Authorization: Bearer skx_live_your_api_key_here

Agents

POST /agents

Create an agent and issue its credential. When an agent with the requested name already exists in the account, the existing agent record is returned and no duplicate is created.

Request body

JSON
{
  "name": "my-agent",
  "scopes": ["db:read", "api:call"],
  "ttl_hours": 720,
  "tags": {
    "env": "production",
    "team": "platform"
  }
}

Response

JSON
{
  "id": "skx://agent/my-agent/a1b2c3d4",
  "name": "my-agent",
  "scopes": ["db:read", "api:call"],
  "ttl_hours": 720,
  "credential": "skx_cred_...",
  "expires_at": "2026-09-15T12:00:00Z",
  "tags": { "env": "production", "team": "platform" },
  "created_at": "2026-06-17T12:00:00Z"
}
Note: The credential field appears only in the initial registration response. Store it securely because it cannot be retrieved later. Rotate a credential through the credential rotation endpoint.
GET /agents

Return every agent in the account. Use the cursor parameter for pagination.

Query parameters

ParameterTypeDescription
limitintegerResults to return per page. Default 20, max 100.
cursorstringPagination cursor from previous response.
tagstringRestrict results to a tag value using the key:value format.
DELETE /agents/:id

Immediately revoke an agent's credential. The agent's skx:// ID stays in the audit log for historical reference, while the credential becomes invalid within 5 seconds of the call.

Invoke

POST /invoke

Send a gated request through the Scalekix gateway for an agent. The gateway validates the credential, checks its scope, forwards the request to the target, and records an audit event.

Request headers

HeaderRequiredDescription
X-Skx-CredentialYesThe agent's credential string.
X-Skx-Run-IdNoOptional run ID used to correlate pipeline activity in the audit log.

Request body

JSON
{
  "target": "https://your-api.example.com/data",
  "method": "GET",
  "headers": { "Accept": "application/json" }
}

Audit log

GET /audit

Fetch audit events with filters for agent, time range, scope, status, and run ID. Results are ordered newest first.

Query parameters

ParameterTypeDescription
agent_idstringFilter by agent skx:// ID.
agent_namestringLimit results to an exact agent name match.
scopestringLimit results by the scope used, such as db:read.
statusstringallowed or denied.
run_idstringFilter by pipeline run ID.
sinceISO 8601Start of time range.
untilISO 8601End of time range.
limitintegerPage size, max 500.
cursorstringPagination cursor from previous response.

Error codes

HTTP StatusError codeMeaning
400invalid_requestA required field is missing or the JSON is malformed.
401unauthorizedInvalid or missing API key.
403scope_violationThe agent tried to perform an action beyond its declared scopes.
403credential_revokedThe agent's credential was revoked.
404agent_not_foundNo agent matches the supplied ID or name.
429rate_limitedRequest volume is too high. Retry after the interval specified by the Retry-After header.
500internal_errorA server error occurred. Contact support if the issue continues.