Skip to content
Discord

Make a Call

The Make a Call endpoint allows you to programmatically trigger an outbound call to any phone number using a specific voice assistant. This is useful for automated notifications, appointment reminders, or immediate lead qualification.

POST /admin/assistant/call

Before the call is placed, the system validates your workspace, checks the assistant’s availability, and then initiates the telephony connection.

sequenceDiagram
    participant App as Your App
    participant API as Voice API
    participant Tel as Telephony Provider
    participant User as Customer Phone

    App->>API: POST /admin/assistant/call
    Note right of App: Includes assistant_id
and to_number API->>API: Validate Workspace & Org API->>API: Load Assistant Config API->>Tel: Initiate Call Tel-->>User: Ringing... Tel-->>API: Call Status: Queued API-->>App: 200 OK { call_id: "..." } User->>Tel: Answers Tel->>API: Stream Audio API->>Tel: AI Response
HeaderTypeRequiredDescription
workspacestringYesYour unique workspace ID.
organizationstringYesYour organization ID.
Content-TypestringYesMust be application/json.
AuthorizationstringYesBearer token for authentication.
ParameterTypeRequiredDescription
assistant_idstringYesThe unique identifier of the assistant to place the call.
to_numberstringYesThe phone number to call in E.164 format (e.g., +919723067241).
curl --location 'https://api.voice-agents.miraiminds.co/v1/admin/assistant/call' \
--header 'workspace: 68d63c242cd956c2bb41cd3a' \
--header 'organization: 68d63c242cd956c2bb41cd12' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_TOKEN>' \
--data '{
    "assistant_id": "68c128a658cd7d0668bce78d",
    "to_number": "+919723067241"
}'

Returns a JSON object containing the status of the call request.

{
  "success": true,
  "message": "Call initiated successfully",
  "data": {
    "call_id": "c_1234567890",
    "status": "queued",
    "assistant_id": "68c128a658cd7d0668bce78d",
    "to_number": "+919723067241"
  }
}
  • 400 Bad Request: Missing to_number or invalid assistant_id.
  • 401 Unauthorized: Invalid or missing workspace/organization/Authorization headers.
  • 404 Not Found: Assistant ID does not exist in the specified workspace.