Skip to main content
This documents the v1 product. It is kept for integrations already running on it. If you are building something new, start with the Quickstart.
This guide follows a customer on the Voice Agents platform through the whole lifecycle, from onboarding to receiving real-time call events at your callback URL.

Lifecycle Overview


Step 1 — Onboard a Brand

Register your brand (a Shopify store) to create a workspace with billing configuration. Every later API operation is scoped to this workspace.
POST /v2/workspace/onboard/shopify

Authentication

Body Parameters

Success Response (200 OK)
Save your workspace ID. Every later API call needs it as a header.

Step 2 — Create an AI Agent

Create a voice assistant with a persona, language, voice and call settings, plus an optional knowledge base.
POST /v1/admin/assistant/create

Headers

Body Parameters

Success Response (200 OK)
Save the assistantId. You need it to initiate calls.
You can’t change variant.type after creation. Choose abandoned_cart for cart recovery flows, or custom if you want full control of the prompt.

Step 3 — Initiate a Call

Trigger an outbound call to a customer using the assistant you created.
POST /v2/call/initiate

Headers

Body Parameters

payload Object

The payload gives the AI context about the customer and their cart. Every field is optional, but we recommend sending them for abandoned_cart assistants.
Success Response (200 OK)
The call is placed asynchronously. The API returns the callId immediately and delivers real-time status updates to your callbackUrl.

Step 4 — Abort a Call

Cancel a queued or in-progress call with the callId you got when you initiated it.
POST /v2/call/abort

Body Parameters

Success Response (200 OK)
After a successful abort, your callbackUrl receives a call.aborted event.
Calls that have already reached call.completed or call.lifecycle-ended state cannot be aborted.

Step 5 — Handle Callback URL & Lifecycle Events

The callbackUrl you provided when initiating the call receives real-time webhook events as the call progresses. Every event echoes back your custom metadata, so you can match events to your internal records.

Call Lifecycle

Lifecycle Events Reference

Webhook Payload Structure

Every event uses the same envelope with your metadata echoed back:
The end-of-call event also includes the AI analysis and credit usage:

Handling Webhooks — Example

Callback URL Tips

  • HTTPS required. Plain HTTP endpoints are rejected.
  • Respond with 200 OK immediately. Voice Agents does not wait for your processing, and slow responses may trigger retries.
  • Use metadata for correlation. Pass your internal IDs (e.g., customerId, orderId) when initiating the call, and they come back in every event.
  • Verify signatures. Check the webhook signature on every incoming request. See Webhook Signature Verification.

API Summary