ApiCalls

Delete call recording

DELETE
/calls/{id}/recording

Permanently delete the audio recording of one call. The recording files are removed from storage and recording_url on the call becomes null. The transcript, summary and analysis results stay.

Use this when a caller objects to being recorded, or to honour an erasure request for a single call. Without this call, recordings are removed automatically when the organization's content retention period ends.

The request is idempotent: if the recording is already gone, the response is 200 with already_deleted: true.

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard.

In: header

Path Parameters

id*string

Call ID

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/calls/string/recording"
{
  "id": "6f1c2b7e-3a4d-4e8f-9b21-0c5d7a9e1f23",
  "recording_deleted": true,
  "already_deleted": false,
  "files_deleted": 3
}
{
  "error": "Invalid API key",
  "message": "string"
}
{
  "error": "Invalid API key",
  "message": "string"
}
{
  "error": "Invalid API key",
  "message": "string"
}

Initiate outbound call POST

Initiate an outbound call from an AI assistant to a destination phone number. **Phone Number Selection (Important for Resellers):** You can specify which phone number to call from using the `number_id` parameter. This is **highly recommended** for: - **Resellers**: Ensure calls are made from numbers dedicated to specific clients - **Branding**: Always use the same caller ID for recognition - **Compliance**: Meet legal requirements for specific numbers - **Local presence**: Use local numbers for better answer rates If `number_id` is not provided, the system will automatically select an available number from your organization's pool, which may not be appropriate for reseller scenarios where numbers are client-specific. **Three Usage Modes:** 1. **Reference Mode** (`assistant_id`) - Reference an existing assistant from your dashboard - Uses the assistant's pre-configured settings - Simplest option for standard calls 2. **Transient Mode** (`assistant`) - Create a one-time assistant configuration without saving - Full control over STT/LLM/TTS configuration - Perfect for personalized or context-specific calls 3. **Hybrid Mode** (`assistant_id` + `assistant_override`) - Reference a saved assistant as the base - Override specific fields (e.g., first_message, llm_config.messages) - Best for personalization while keeping base config **⚠️ Deprecated:** `agent_id`, `agent`, and `agent_config` are deprecated. Use `assistant_id`, `assistant`, and `assistant_override` instead. **Use Cases:** - Appointment reminders with personalized greetings - Customer follow-ups with dynamic context - Survey calls with specific question flows - Delivery notifications - Payment reminders with account-specific details **Configuration Notes:** - Whether `stt_config` and `tts_config` are needed follows from `llm_config.provider`. The assistant schema below carries that as a condition, generated from the platform catalog; this text deliberately does not repeat the provider names, because a second list here would go stale the moment a provider is added. - With a realtime (speech-to-speech) provider the model handles transcription and speech itself: both blocks are unnecessary, are ignored when sent, and the voice goes in `llm_config.voice`. - Every other provider runs the orchestrated STT -> LLM -> TTS pipeline and needs both blocks. - The call will be initiated immediately and the response will include a `call_id` to track progress **Response Time:** Your call will typically connect within 2-5 seconds.

Send control command to active call POST

Send real-time commands to an active call. The call must be in "in-progress" status. **⚠️ IMPORTANT: xAI Realtime Model Limitations** Call control has **significant limitations** when using xAI Realtime (grok-realtime-v1) due to its speech-to-speech architecture: - ❌ `inject-context`: Limited effectiveness - context may not influence responses reliably - ❌ `say`: Does not work reliably - commands often timeout or fail to trigger speech - ✅ `end-call`: Works reliably - ⚠️ `transfer`: Partial support - announcement may not work, but transfer executes **Why the limitations?** xAI Realtime is an end-to-end audio model that processes speech directly without intermediate text. It expects continuous audio input and cannot reliably respond to text-based control commands mid-conversation. **Recommendation:** If you need full call control support (`inject-context`, `say`, `transfer` with announcements), use the traditional pipeline: - **Provider**: `openai` with `gpt-4o` or `gpt-4o-mini` - **STT**: Deepgram (`nova-3-general`) - **TTS**: ElevenLabs or OpenAI TTS - **Result**: All control commands work reliably **Command Types:** - `inject-context`: Silently add information to the agent's context (traditional models only) - `say`: Make the agent speak specific text (traditional models only) - `end-call`: End the call with an optional final message (works with all models) - `transfer`: Transfer the call to another destination (partial xAI Realtime support) **Use Cases:** - SMS verification: Inject received codes into the conversation - CRM integration: Add customer context mid-call - Human escalation: Transfer to a live agent - Emergency end: Gracefully terminate problematic calls