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_idstringuuidrequiredUUID 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. - tostringrequiredDestination 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. - variablesobjectoptionalPer-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.
- successbooleanrequiredAlways
truewhen the API returned 201. Errors surface as 4xx/5xx with the Error envelope. - providerstringoptionalVoice provider that accepted the call (mirrors the agent's
provider). - callIdstringoptionalProvider's call identifier. Use this with
GET /calls/{id}after the call appears in the workspace's call history.
Errors
- 400Bad RequestValidation failed / malformed request.
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 404Not FoundResource not found in this workspace.
- 409ConflictRequest conflicts with current resource state.
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.