Access layer / software

ApexAPI

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.

At a glance

Who it is for
Developers whose software runs web-data jobs, sends messages, works support conversations, or reads results, history, and evidence.
What it gives you
Typed, scoped contracts per product, with idempotent side effects, stable error codes, and bounded retrieval.
How it is reached
HTTPS with a bearer key the product issues. One contract per product; no shared gateway, base URL, or sign-on.
Products
Scrawl, Communications, and DevOps. A Shop Bot store has its own merchant API. Shop Bot integration

When to use it

Software that runs product work without a person watching.

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.

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.

Explicit side effects

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.

Lifecycle IDs

Work returns an ID at once. Scrawl jobs are accepted and run asynchronously; communications return their record with its current status.

Bounded retrieval

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

One contract per product. One set of rules.

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.

ApexAPI operations and scopes by product
ProductOperationsScopes
Scrawl
  • Scrape one URL to Markdown, links, HTML, or JSON shaped by your schema; map a site; scrape a batch of up to 20 URLs
  • Crawl a site into a new dataset version within a page and depth budget, or start a prepared catalog crawl
  • Turn a page you fetched yourself into the same formats as a scrape
  • Read, wait on, and cancel owned jobs; read results and artifacts, including a page as Markdown
  • Quote a page's files and media with a credit ceiling, extract them, and download each file or a document's text
  • Datasets: versions, activation, curation without a crawl, record quarantine, version diffs, field discovery, typed queries, search, and record fetch
  • Extract to a schema and ask questions with citations, on your own AI provider; manage your AI provider profiles and read their usage
  • Register, test, and remove your own proxy or a pool of them, with an advisory health report
  • Read your credit balance and the command catalog; list and revoke your account's keys
  • scrape:write
  • jobs:read
  • artifacts:read
  • credits:read
  • commands:read
  • ai:configure
  • ai:use
  • keys:manage
Communications
  • Send SMS, WhatsApp, and email from the workspace's own verified senders, with an optional prepare-and-confirm step
  • Read one communication, or list history across channels in stable pages
  • List, search, and read support conversations on Telegram Business, SMS, WhatsApp, and email, with each reply's provenance and any media
  • Reply, draft a reply with the workspace's own AI, escalate, resolve, hand off, assign, and reopen, refused if the conversation changed underneath
  • Notes, tags, and saved replies; the reply queue and the support overview
  • Read and search contacts, and correct their names, notes, and tags; never their consent
  • Read the members, the settings, the plan and the audit log; change the support and workspace settings
  • Signed event webhooks: register, rotate, test, and remove endpoints, and read the delivery log
  • Agent credentials, whose actions wait for a member's approval unless the workspace grants them, and the AI brake
  • communications:send
  • communications:read
  • conversations:read
  • conversations:reply
  • conversations:manage
  • contacts:read
  • contacts:write
  • workspace:read
  • workspace:write
  • audit:read
  • autonomy:pause
  • webhooks:read
  • webhooks:write

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

What happens to every call.

The transport never becomes the authority. Every request is authenticated, scoped, validated, and put through product policy before anything runs.

ApexAPI request
  1. 01Authenticate the caller
  2. 02Check the scope
  3. 03Validate the typed request
  4. 04Apply product policy
  5. 05Execute or queue
  6. 06Return an ID and state
  7. 07Read results and history

Mutations and retries

Retry safely. Send once.

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.

Idempotency-Key behavior by product
RequestCommunicationsScrawl
First request with a new keyThe 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 request201 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 request409 idempotency_conflict.422 invalid_request.
Same key, first request still running409 idempotency_in_progress. Retry shortly.409 conflict. Retry shortly.
The first request was refused or never finishedA 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 keyIndependent: keys belong to one workspace and one credential.Independent: another caller's key never replays.

Errors

Errors a program can branch on.

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.

Communications

Communications API error codes
CodeHTTPMeaning
authentication_failed401The credential is missing, malformed, unknown, revoked, or expired: one answer for all five.
insufficient_scope403The credential is valid but lacks the operation's scope.
resource_not_found404No such record in this workspace.
validation_error422The request, a header, or a cursor is not valid.
trust_safety_denied422The workspace's safety policy refused it: suppression, quiet hours, template state, or risk state.
plan_limit_reached402The plan's limit for this period is reached, or the plan does not include the feature. Never a price.
idempotency_conflict409The key was already used for a different request.
idempotency_in_progress409The first request with this key has not finished.
confirmation_required428The credential needs a confirmation, or for an agent a person's approval, before this runs.
approval_pending409An agent's action is waiting for a member to approve it; Retry-After says when to ask again.
action_requires_person403Only a person may do this, or change this field. No approval or grant admits it.
machine_writes_paused423A member paused every machine's writes in this workspace. Reads continue.
rate_limited429Too many requests; Retry-After says when to try again.
provider_failure502The workspace's provider rejected the send.
temporarily_unavailable503The workspace's policy could not be checked safely, so nothing ran; retry later.
internal_error500An unexpected failure inside the product.

Scrawl

Scrawl API error codes
CodeHTTPMeaning
unauthorized401No credential was sent, or the API key was not accepted.
forbidden403The key is valid but may not do this, for example a missing scope.
account_not_active403The key's account is suspended, or has not accepted the current terms in Telegram.
not_found404The resource does not exist or is not the caller's; the two are never distinguished.
invalid_request422The request is malformed or outside a documented bound. Field errors never echo the values sent.
budget_exceeded422The job's estimate is above the request's credit ceiling; nothing was reserved.
egress_required400The job needs a tested proxy and the caller has none; nothing was sent.
insufficient_credits402The account does not have the credits this job needs.
conflict409The request conflicts with one still in progress, or with a job that has not finished.
payload_too_large413The request body is larger than the route accepts.
rate_limited429Too many requests; wait Retry-After seconds, then retry.
too_many_active_jobs429The caller already has the most running or queued jobs allowed; retry after Retry-After.
internal_error500An unexpected failure, possibly after work started: list your jobs before sending a job request again.

Scrawl API

Scrape, crawl, and query. Results you can cite.

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/keys

Fixed limits

  • A URL is up to 2,048 characters, and a page's response up to 25 MB.
  • A page's Markdown and its HTML are kept up to 200,000 characters each; a longer page is cut, and the result says so.
  • A batch takes up to 20 URLs, and a map lists up to 500.
  • A site crawl reaches up to 500 pages and 5 links deep, one at a time for each caller.
  • Requests per key and per account, and jobs running at once, are limited; a refusal always says how long to wait.
Illustrative exampleA site crawl into a dataset
Request
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
}
Response (abridged)
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"
  }
}
The routes, fields and statuses are Scrawl's own; the site and the identifiers are invented. Make the next call until done is true.

Opening soon

Follow updates on Telegram.

Communications API

Describe the communication, not the provider call.

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}
Illustrative exampleA reply through ApexAPI
Request
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
}
When it cannot be sent
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.

Signed event webhooks

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.

Communications webhook events
EventSent when
message.received.v1A customer's message arrives.
message.status_changed.v1A message's delivery status changes.
conversation.changed.v1A conversation is assigned, unassigned, escalated, handed off, resolved, or reopened.
contact.opted_out.v1A contact opts out on a channel.

Opening soon

Follow updates on Telegram.

DevOps API

Supervision, correction, and evidence, for your software.

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

Opening soon

Follow updates on Telegram.

Tooling

Real contracts, no invented gateway.

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.

ApexAi