Product-owned identity
Each product issues and checks its own keys. A key resolves to one account, workspace, or store and a set of scopes; ownership decides what it can read.
Navigate
Access layer / software
Typed, scoped HTTP into each ApexAi product.
ApexAPI is how software uses ApexAi products. Each product publishes its own contract, issues its own keys, and enforces its own policy; ApexAPI is the discipline they share: typed requests, scoped credentials, explicit side effects, idempotent retries, stable errors, and bounded retrieval.
When to use it
Use ApexAPI when an application or service owns the call and its retries: running web-data jobs, sending customer messages, answering support conversations, and reading results and history into your own systems.
Each product issues and checks its own keys. A key resolves to one account, workspace, or store and a set of scopes; ownership decides what it can read.
Anything that spends credits, uses a plan's allowance, or reaches a provider is a distinct, scoped operation, never a side effect of a read.
Work returns an ID at once. Scrawl jobs are accepted and run asynchronously; communications return their record with its current status.
Lists are paginated or bounded, reads are limited to what the caller owns, and artifacts and files are fetched one at a time.
Product coverage
ApexAPI is not a gateway in front of the products, and it is not a new execution engine. Each product owns its contract; the rules below apply to every one.
| Product | Operations | Scopes |
|---|---|---|
| Scrawl |
|
|
| Communications |
|
|
DevOps' contract is described by what it does, in DevOps API. Shop Bot is not on ApexAPI or ApexMCP. Each managed store has its own merchant API with signed webhooks and its own MCP endpoint, scoped to that one store, and the Shop SDK and Shop agent plugin connect to it. Shop Bot integration →
Request lifecycle
The transport never becomes the authority. Every request is authenticated, scoped, validated, and put through product policy before anything runs.
Mutations and retries
Networks drop responses, and a client that cannot tell whether a send happened will retry. Communications requires an Idempotency-Key on every send and reply and stores the outcome durably, so a retry replays the result instead of messaging a customer twice. Scrawl accepts the same header on every job submission, so a retried scrape or crawl never runs twice.
| Request | Communications | Scrawl |
|---|---|---|
| First request with a new key | The send runs once, and its result is stored against the key. | The job is submitted once, and its first answer is kept against the key. |
| Same key, same request | 201 with the original body and idempotent_replay: true. Nothing is sent or charged twice. | The first answer again. No second job starts. |
| Same key, different request | 409 idempotency_conflict. | 422 invalid_request. |
| Same key, first request still running | 409 idempotency_in_progress. Retry shortly. | 409 conflict. Retry shortly. |
| The first request was refused or never finished | A refusal is the key's final answer, replayed on every retry. A request that never finished is refused for good. Use a new key. | 500 submission_failed when it may have started work: list your jobs, then retry with a new key. |
| Another caller's key | Independent: keys belong to one workspace and one credential. | Independent: another caller's key never replays. |
Errors
Failures come back as stable, machine-readable codes with the matching HTTP status, so a client decides whether to retry, fix the request, or stop, without parsing prose. Each product has its own vocabulary; these are the codes most integrations meet.
| Code | HTTP | Meaning |
|---|---|---|
authentication_failed | 401 | The credential is missing, malformed, unknown, revoked, or expired: one answer for all five. |
insufficient_scope | 403 | The credential is valid but lacks the operation's scope. |
resource_not_found | 404 | No such record in this workspace. |
validation_error | 422 | The request, a header, or a cursor is not valid. |
trust_safety_denied | 422 | The workspace's safety policy refused it: suppression, quiet hours, template state, or risk state. |
plan_limit_reached | 402 | The plan's limit for this period is reached, or the plan does not include the feature. Never a price. |
idempotency_conflict | 409 | The key was already used for a different request. |
idempotency_in_progress | 409 | The first request with this key has not finished. |
confirmation_required | 428 | The credential needs a confirmation, or for an agent a person's approval, before this runs. |
approval_pending | 409 | An agent's action is waiting for a member to approve it; Retry-After says when to ask again. |
action_requires_person | 403 | Only a person may do this, or change this field. No approval or grant admits it. |
machine_writes_paused | 423 | A member paused every machine's writes in this workspace. Reads continue. |
rate_limited | 429 | Too many requests; Retry-After says when to try again. |
provider_failure | 502 | The workspace's provider rejected the send. |
temporarily_unavailable | 503 | The workspace's policy could not be checked safely, so nothing ran; retry later. |
internal_error | 500 | An unexpected failure inside the product. |
| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | No credential was sent, or the API key was not accepted. |
forbidden | 403 | The key is valid but may not do this, for example a missing scope. |
account_not_active | 403 | The key's account is suspended, or has not accepted the current terms in Telegram. |
not_found | 404 | The resource does not exist or is not the caller's; the two are never distinguished. |
invalid_request | 422 | The request is malformed or outside a documented bound. Field errors never echo the values sent. |
budget_exceeded | 422 | The job's estimate is above the request's credit ceiling; nothing was reserved. |
egress_required | 400 | The job needs a tested proxy and the caller has none; nothing was sent. |
insufficient_credits | 402 | The account does not have the credits this job needs. |
conflict | 409 | The request conflicts with one still in progress, or with a job that has not finished. |
payload_too_large | 413 | The request body is larger than the route accepts. |
rate_limited | 429 | Too many requests; wait Retry-After seconds, then retry. |
too_many_active_jobs | 429 | The caller already has the most running or queued jobs allowed; retry after Retry-After. |
internal_error | 500 | An unexpected failure, possibly after work started: list your jobs before sending a job request again. |
Scrawl API
Scrape and map calls answer within a bounded wait or hand back the job to collect later; crawls and other jobs return 202 Accepted with a job ID and the call to make next. Every job runs through the account's own tested proxy and the same gate as a Telegram or agent request, reads are limited to what the key's owner owns, and every submission accepts an Idempotency-Key. Schema extraction and cited answers run on the caller's own AI provider.
An account makes its keys in Telegram with /api_keys; each is shown once and can be revoked there, or through ApexAPI with a key that holds keys:manage.
Representative routes
POST/v1/scrapeGET/v1/scrape/{job_id}/contentPOST/v1/mapPOST/v1/scrape/batchPOST/v1/site-crawlsGET/v1/site-crawls/{crawl_id}POST/v1/crawlsGET/v1/jobs/{job_id}POST/v1/jobs/{job_id}/cancelGET/v1/artifacts/{job_id}/{filename}POST/v1/assets/quotePOST/v1/assetsGET/v1/assets/{job_id}/files/{asset_id}POST/v1/datasets/{dataset_id}/curateGET/v1/datasets/{dataset_id}/diffPOST/v1/datasets/{dataset_id}/queryPOST/v1/searchPOST/v1/extractPOST/v1/askPUT/v1/proxyPOST/v1/proxy/testGET/v1/credits/balanceGET/v1/keysFixed limits
POST /v1/site-crawls
Authorization: Bearer <ApexAPI key>
Idempotency-Key: docs-crawl-1
Content-Type: application/json
{
"url": "https://docs.example.com/",
"max_pages": 50,
"max_depth": 2
}
202 Accepted
{
"crawl_id": "c7e2f81a09d4",
"status": "pending",
"url": "https://docs.example.com/",
"max_pages": 50,
"max_depth": 2,
"dataset_id": "ds_docs_example",
"done": false,
"poll_after_seconds": 5,
"next_call": {
"method": "GET",
"path": "/v1/site-crawls/c7e2f81a09d4"
}
}
done is true.Communications API
A send names a channel, a contact, and a message or template; a reply names a conversation. The product picks the workspace's own sender, applies consent and Trust and Safety, and returns a redacted record. Integrations can be required to prepare first and confirm with a single-use token, and an agent's actions wait for a member's approval unless the workspace grants that class of action.
A workspace administrator makes each key in the web console, with only the scopes it needs. Its secret is shown once.
POST/api/v1/communicationsPOST/api/v1/communications/confirmationsGET/api/v1/communications/{communication_id}GET/api/v1/communicationsGET/api/v1/conversationsGET/api/v1/conversations/searchGET/api/v1/conversations/{conversation_id}POST/api/v1/conversations/{conversation_id}/draftsPOST/api/v1/conversations/{conversation_id}/repliesPOST/api/v1/conversations/{conversation_id}/replies/confirmationsPOST/api/v1/conversations/{conversation_id}/escalatePOST/api/v1/conversations/{conversation_id}/resolvePOST/api/v1/conversations/{conversation_id}/handoffPOST/api/v1/conversations/{conversation_id}/notesGET/api/v1/contacts/{contact_id}POST/api/v1/confirmationsPOST/api/v1/confirmations/{confirmation_id}/executePOST/api/v1/webhooks/endpointsGET/api/v1/webhooks/deliveriesPOST/api/v1/autonomy/pauseGET/api/v1/credentialGET/api/v1/media/{token}POST /api/v1/conversations/{id}/replies
Authorization: Bearer <api credential>
Idempotency-Key: reply-7f3a
Content-Type: application/json
{
"body": "It ships today.",
"provenance": "human",
"expected_version": 4
}
409 conversation_owned_by_human
409 conversation_version_conflict
422 conversation_window_closed
422 trust_safety_denied
Conversation checks refuse before anything
is recorded or sent.
An endpoint of yours receives the workspace's events as they happen, instead of polling. A person registers it in the console, or a key that holds webhooks:write and each event's read scope.
Each delivery carries Comms-Event-Id, Comms-Event-Type, Comms-Delivery-Attempt, and Comms-Signature: an HMAC-SHA256 of the timestamp, the event ID, and the raw body, keyed with the endpoint's secret. Verify the exact bytes before parsing them, and refuse a timestamp more than 300 seconds from your clock. A failed delivery is retried with backoff for about four days, in order, and the event ID stays the same, so de-duplicate on it.
| Event | Sent when |
|---|---|
message.received.v1 | A customer's message arrives. |
message.status_changed.v1 | A message's delivery status changes. |
conversation.changed.v1 | A conversation is assigned, unassigned, escalated, handed off, resolved, or reopened. |
contact.opted_out.v1 | A contact opts out on a channel. |
DevOps API
DevOps supervises the systems a customer connects, corrects them within the authority the customer gives it, verifies every correction independently, recovers when a correction does not hold, and keeps the evidence. Through ApexAPI your own software reads that work: what DevOps saw, decided and changed, and the evidence. Reading it changes nothing: DevOps' own rules decide every change.
Like every ApexAi product, DevOps owns its execution and policy: a caller can ask, and DevOps decides what changes, within the rules you set. No API request or agent goes around them.
ApexAi operates DevOps. Your systems connect to it through the public DevOps SDK. DevOps SDK → DevOps for developers →
Tooling
Each product serves its own contract under its own address, and issues its own keys. There is no shared base URL, cross-product SDK, or single sign-on across products.
The contracts are typed end to end. Scrawl publishes its OpenAPI document with error, scope, and MCP tool manifests, and its Python and TypeScript SDKs and command-line tool are built from it; Communications serves its own OpenAPI document. ApexSDK lists the code libraries, and the plugins page the agent plugins, each with its install steps.