Skip to main content
POST
/
v2
/
call
/
initiate
curl --request POST \
  --url https://api.voice-agents.miraiminds.co/v2/call/initiate \
  --header 'Content-Type: application/json' \
  --header 'workspace: <workspace>' \
  --header 'x-private-key: <api-key>' \
  --header 'x-public-key: <api-key>' \
  --data '
{
  "phoneNumber": "+919876543210",
  "assistant": "assistant_123",
  "callbackUrl": "https://example.com/webhooks/call-events",
  "payload": {
    "id": "gid://shopify/AbandonedCheckout/66509168181329",
    "abandonedCheckoutUrl": "https://example-store.myshopify.com/checkouts/ac/abc123xyz/recover?key=sample_recovery_key&locale=en-IN",
    "customer": {
      "firstName": "John",
      "lastName": "Doe",
      "email": null,
      "phone": "+919876543210"
    },
    "discountCodes": [],
    "totalDiscountSet": {
      "shopMoney": {
        "amount": "0.0"
      }
    },
    "subtotalPriceSet": {
      "shopMoney": {
        "amount": "1895.0"
      }
    },
    "totalPriceSet": {
      "shopMoney": {
        "amount": "1895.0"
      }
    },
    "taxesIncluded": true,
    "taxLines": [
      {
        "rate": 0.05,
        "ratePercentage": 5,
        "source": null,
        "title": "IGST",
        "price": "90.24"
      }
    ],
    "lineItems": [
      {
        "title": "Sample Product Name",
        "quantity": 1,
        "variant": {
          "id": "gid://shopify/ProductVariant/58523289485393",
          "title": "Default / Standard / Regular"
        }
      }
    ],
    "billingAddress": {
      "country": "India",
      "phone": "+919876543211"
    },
    "shippingAddress": {
      "country": "India",
      "address1": "123 Sample Street, Sample Area",
      "address2": "Apt 4B",
      "city": "Delhi",
      "province": "DL",
      "provinceCode": "DL",
      "zip": "110001",
      "phone": "+919876543211"
    }
  }
}
'
{
  "status": "initiate",
  "callId": "<string>"
}

Authorizations

x-public-key
string
header
required
x-private-key
string
header
required

Headers

x-public-key
string
required
x-private-key
string
required
workspace
string
required

Body

application/json
phoneNumber
string
required

Phone number (E.164 recommended)

Example:

"+919876543210"

assistant
string
required

Assistant ID

payload
object
required

Payload structure depends on the assistant variant. Use AbandonedCartPayload for abandoned_cart assistants, CustomPayload for custom assistants.

callbackUrl
string<uri>
required

HTTPS webhook URL

priority
boolean

Call priority level

Example:

true

metadata
object

Response

Call queued

status
enum<string>

Current call status

Available options:
initiate,
in-progress,
ended,
completed,
timeout,
failed,
validation-failed,
busy,
no-answer,
skip,
rescheduled,
aborted
callId
string