Docs
Open dashboard

Create outbound call

POST/calls

Queue an outbound call from the agent named in agent_id to to. The call is dispatched asynchronously via the agent's provider. Returns 201 with the provider's call id; use GET /calls/{id} to poll status.

Requires Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.

Body application/json

  • agent_idstringuuidrequired
    UUID of the agent that places the call. Must belong to this workspace and be either an outbound agent or an inbound agent with allow_outbound=true.
  • tostringrequired
    Destination phone number in E.164 (leading + and country code). Validated against ^\+?[1-9]\d{6,14}$ (7-15 digits, optional leading +). Invalid numbers return 400 invalid_request.
  • variablesobjectoptional
    Per-call template variables merged into the agent's system prompt and first message. Values are stringified by the agent runtime. Keys must match the variable placeholders the agent expects.

Response 201 Created

Outbound call accepted.

  • successbooleanrequired
    Always true when the API returned 201. Errors surface as 4xx/5xx with the Error envelope.
  • providerstringoptional
    Voice provider that accepted the call (mirrors the agent's provider).
  • callIdstringoptional
    Provider's call identifier. Use this with GET /calls/{id} after the call appears in the workspace's call history.

Errors

  • 400Bad Request
    Validation failed / malformed request.
  • 401Unauthorized
    Missing, malformed, or invalid API key.
  • 403Forbidden
    Workspace unavailable, suspended, or paywalled.
  • 404Not Found
    Resource not found in this workspace.
  • 409Conflict
    Request conflicts with current resource state.
  • 429Too Many Requests
    Workspace request limit exceeded; shared across all its API keys.