Aywa RuntimeDocumentation
Website Create account

Runtime API

A migration-friendly API surface for production voice agents.

The runtime exposes assistants, phone numbers, calls, tools, credentials, logs, metrics, files, and webhook endpoints through a private HTTP API.

Authentication

Production routes require API authentication. Health and readiness endpoints stay public so load balancers and orchestration systems can probe the service.

Headers
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.

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.

POST/callCreate a call using assistant, transport, customer, phone, or web fields.
POST/call/phonePhone-specific create route for outbound telephony flows.
POST/call/webCreate a web call without a phone number or customer phone field.
POST/call/:id/controlSay, add message, end call, transfer, handoff, DTMF, or custom controls.
GET/call/:id/timelineSupport timeline merging logs, messages, webhooks, transcript summary, and artifacts.
GET/call/:id/costsProvider cost breakdown based on the configured rate card.
GET/call/:id/recordingMono recording artifact when recording is enabled.
GET/call/:id/recording/stereoStereo artifact when the stereo recording pipeline is enabled.
GET/call/:id/pcapSIP/RTP packet capture artifact when enabled for diagnostics.

Logs and observability

GET/logsUnified log stream.
GET/logs/callsCall event logs.
GET/logs/webhooksWebhook jobs and attempts with status, latency, and retry metadata.
POST/logs/webhooks/:id/replayReplay a stored attempt against the current target configuration.
POST/logs/webhooks/jobs/:id/retryRequeue a failed or skipped durable webhook job.
GET/analytics/summaryRuntime analytics summary when analytics storage is configured.
GET/sloCurrent SLO snapshot for voice pipeline, API, webhook success, and audio warnings.

List filters

List endpoints support date and limit filters for migration tooling and dashboard pagination.

Query params
?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

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.

POST/freeswitch/inboundCreate an inbound call from a routed DID or SIP URI.
POST/freeswitch/eventsMap progress, answer, and hangup events into call status updates.
POST/freeswitch/audioPush audio chunks into the runtime audio pipeline.
POST/internal/calls/:id/audioInternal media bridge audio ingress.