Authentication
Production routes require API authentication. Health and readiness endpoints stay public so load balancers and orchestration systems can probe the service.
Authorization: Bearer <runtime-api-key>
X-API-Key: <runtime-api-key>
Supabase Auth can also be enabled for dashboard or user sessions. Runtime API keys remain the simplest mechanism for server-to-server traffic.
SDK-ready contract
The runtime API is designed for a TypeScript SDK that talks directly to the deployed runtime endpoint.
The SDK client must receive an explicit baseUrl; the control plane at
app.aywaruntime.com is for license, install, billing, support, and status workflows, not
for call/data-path SDK traffic.
For a step-by-step backend setup, use the dedicated Runtime SDK guide.
npm install @aywa-ai/runtime-sdk
baseUrlRequired runtime URL, for example https://runtime.customer.example.com.authRuntime API key sent as bearer token or X-API-Key.idempotencyClient-provided keys for create/import flows where supported.webhooksSigned event verification helpers for server events.import { AywaRuntimeClient } from "@aywa-ai/runtime-sdk";
const client = new AywaRuntimeClient({
baseUrl: "https://runtime.customer.example.com",
apiKey: process.env.AYWA_RUNTIME_API_KEY,
});
Test your runtime API.
Enter the base URL of your deployed runtime and a runtime API key. The key is kept in this browser session and is used only for requests sent to the base URL you provide.
https://docs.aywaruntime.com.
If CORS is closed, use the generated cURL locally.
curl -fsSL https://runtime.example.com/readyz
Run a request to see the response here.
Core resources
/assistantCreate, list, read, patch, and delete assistant configurations./phone-numberManage BYO phone numbers and their assistant or SIP credential bindings./callCreate outbound, inbound, web, or phone calls and inspect call state./toolCreate and manage tools that can be attached to assistant model configuration./credentialStore reusable server, webhook, provider, or BYO SIP credential references with redaction./webhook-endpointConfigure account-wide, assistant, phone-number, or tool webhook targets./fileStore file resources and expose content for tools or knowledge workflows./structured-outputDefine schema-backed post-call or on-demand structured extraction jobs.Calls
A call owns the real-time session: media ingress, STT events, assistant turns, tools, TTS, recordings, logs, costs, and final report data.
/callCreate a call using assistant, transport, customer, phone, or web fields./call/phonePhone-specific create route for outbound telephony flows./call/webCreate a web call without a phone number or customer phone field./call/:id/controlSay, add message, end call, transfer, handoff, DTMF, or custom controls./call/:id/timelineSupport timeline merging logs, messages, webhooks, transcript summary, and artifacts./call/:id/costsProvider cost breakdown based on the configured rate card./call/:id/recordingMono recording artifact when recording is enabled./call/:id/recording/stereoStereo artifact when the stereo recording pipeline is enabled./call/:id/pcapSIP/RTP packet capture artifact when enabled for diagnostics.Logs and observability
/logsUnified log stream./logs/callsCall event logs./logs/webhooksWebhook jobs and attempts with status, latency, and retry metadata./logs/webhooks/:id/replayReplay a stored attempt against the current target configuration./logs/webhooks/jobs/:id/retryRequeue a failed or skipped durable webhook job./analytics/summaryRuntime analytics summary when analytics storage is configured./sloCurrent SLO snapshot for voice pipeline, API, webhook success, and audio warnings.Runtime activation
The installer uses a short-lived install token for the first activation. After that, the runtime can check in with its own instance key so the cockpit receives real heartbeat metadata, redacted inventory, and license lease renewals.
/v1/runtime/check-inCreate or update a runtime deployment heartbeat for the control plane./v1/runtime/inventorySync redacted runtime resources without prompts, transcripts, phone numbers, secrets, or call logs./v1/runtime/license/renewIssue a short-lived signed license lease for an activated runtime slot.{
"installToken": "aywa_install_...",
"instanceKey": "generated-on-the-runtime-host",
"name": "private-beta-vps",
"runtimeVersion": "0.1.0",
"agentVersion": "0.1.0",
"dashboardUrl": "https://runtime.customer.example.com",
"apiUrl": "https://api.runtime.customer.example.com",
"region": "eu-west",
"accessMode": "public_https",
"status": "healthy",
"capabilities": {
"phoneCalls": true,
"webCalls": true,
"toolCalls": true
},
"healthSummary": {
"medianTurnMs": 482
},
"licenseState": "active",
"syncCursor": "2026-06-23T18:00:00.000Z",
"lastAppliedRevision": "rel_2026_06_23",
"generatedAt": "2026-06-23T18:00:00.000Z"
}
{
"instanceKey": "generated-on-the-runtime-host",
"syncCursor": "2026-06-23T18:05:00.000Z",
"resources": [
{
"kind": "assistant",
"localResourceId": "assistant_local_01",
"displayName": "Support voice agent",
"version": "2026-06-23",
"revision": "rev_42",
"checksum": "sha256:...",
"manifestRedacted": true,
"metadata": {
"language": "en",
"channel": "phone"
}
}
]
}
{
"instanceKey": "generated-on-the-runtime-host",
"runtimeVersion": "0.1.0",
"agentVersion": "0.1.0",
"nonce": "renewal-attempt-uuid"
}
Runtime sync rejects sensitive keys such as prompts, transcripts, recordings, phone numbers, provider credentials, routing rules, raw logs, and tool payloads. Registry tokens are issued through a separate endpoint and are not included in license renewals.
List filters
List endpoints support date and limit filters for migration tooling and dashboard pagination.
?limit=50
?createdAtGt=2026-05-01T00:00:00.000Z
?createdAtLt=2026-06-01T00:00:00.000Z
?updatedAtGe=2026-05-15T00:00:00.000Z
?updatedAtLe=2026-05-31T23:59:59.999Z
Organization-scoped runtime APIs
Runtime APIs can be scoped to a runtime-local organization with X-Organization-Id or the SDK
organizationId option. This value is not the app.aywaruntime.com workspace id. It is the
organization id generated by the deployed runtime when a local client, brand, department, or SaaS customer workspace is created.
curl "$RUNTIME_URL/assistant" \
-H "Authorization: Bearer $RUNTIME_API_KEY" \
-H "X-Organization-Id: $AYWA_RUNTIME_ORGANIZATION_ID"
FreeSWITCH and media hooks
FreeSWITCH remains a telephony edge. The runtime accepts inbound calls, lifecycle events, and audio hooks so media enters the same STT, recording, live listen, and runtime log path.
/freeswitch/inboundCreate an inbound call from a routed DID or SIP URI./freeswitch/eventsMap progress, answer, and hangup events into call status updates./freeswitch/audioPush audio chunks into the runtime audio pipeline./internal/calls/:id/audioInternal media bridge audio ingress.