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 walks through the complete lifecycle of a customer on the Voice Agents platform — from initial onboarding to receiving real-time call events via your callback URL.

Lifecycle Overview


Step 1 — Onboard a Brand

Register your brand (Shopify store) to create a workspace with billing configuration. All subsequent API operations are scoped to this workspace.
POST /v2/workspace/onboard/shopify

Authentication

Body Parameters

Success Response (200 OK)
Save your workspace ID — it is required as a header in every subsequent API call.

Step 2 — Create an AI Agent

Create a voice assistant configured with a persona, language, voice, call settings, and optionally a knowledge base.
POST /v1/admin/assistant/create

Headers

Body Parameters

Success Response (200 OK)
Save the assistantId — it is required when initiating calls.
variant.type is immutable after creation. Choose abandoned_cart for cart recovery flows or custom for fully flexible prompts.

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 provides the AI with context about the customer and their cart. All fields are optional but recommended for abandoned_cart assistants.
Success Response (200 OK)
The call is placed asynchronously. The callId is returned immediately — real-time status updates are delivered to your callbackUrl.

Step 4 — Abort a Call

Cancel a queued or in-progress call using the callId returned during initiation.
POST /v2/call/abort

Body Parameters

Success Response (200 OK)
After a successful abort, your callbackUrl will receive 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. Your custom metadata is echoed back in every event so you can correlate 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 additionally includes 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; slow responses may trigger retries.
  • Use metadata for correlation — pass your internal IDs (e.g., customerId, orderId) when initiating the call; they are echoed in every event.
  • Verify signatures — validate the webhook signature on every incoming request. See Webhook Signature Verification.

API Summary