### Complete Example: Vobiz to Vapi Integration Source: https://www.docs.vobiz.ai/integrations/vapi-api A comprehensive example demonstrating the sequence of API calls required to set up and initiate a call using Vobiz and Vapi. ```APIDOC ## Complete Example: Vobiz to Vapi Integration Here's a complete working example with real values from our setup: ### Step 1: Create SIP Credential **Description:** Creates a SIP credential required for Vobiz to connect to Vapi. **Method:** POST **Endpoint:** `https://api.vapi.ai/credential` **Request Body:** ```json { "provider": "byo-sip-trunk", "name": "Vobiz Trunk 2", "gateways": [ { "ip": "bfab10fb.sip.vobiz.ai", "inboundEnabled": false } ], "outboundLeadingPlusEnabled": true, "outboundAuthenticationPlan": { "authUsername": "Vapi_user", "authPassword": "Password@123" } } ``` **Success Response (200):** - **id** (string) - The unique identifier for the created credential. **Response Example:** ```json { "id": "65a79bd2-c1b9-4c83-8e55-97c22c092b48", ... } ``` ### Step 2: Register Phone Number **Description:** Registers a phone number with Vapi, linking it to the previously created SIP credential. **Method:** POST **Endpoint:** `https://api.vapi.ai/phone-number` **Request Body:** ```json { "provider": "byo-phone-number", "name": "Vobiz Line 2", "number": "08071387149", "numberE164CheckEnabled": false, "credentialId": "65a79bd2-c1b9-4c83-8e55-97c22c092b48" } ``` **Success Response (200):** - **id** (string) - The unique identifier for the registered phone number. **Response Example:** ```json { "id": "91122039-9644-47fd-a545-d865075a6941", ... } ``` ### Step 3: Make Outbound Call **Description:** Initiates an outbound call using the registered assistant and phone number. **Method:** POST **Endpoint:** `https://api.vapi.ai/call/phone` **Request Body:** ```json { "assistantId": "9fb6d4c5-9403-49ea-afeb-9b493d63b474", "customer": { "number": "+919148223344", "numberE164CheckEnabled": false }, "phoneNumberId": "91122039-9644-47fd-a545-d865075a6941" } ``` **Success Response (200):** - **callId** (string) - The unique identifier for the initiated call. **Response Example:** ```json { "callId": "call-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", ... } ``` ``` -------------------------------- ### Troubleshoot Couldn't Get Assistant Source: https://www.docs.vobiz.ai/integrations/vapi-api This section helps resolve issues where the AI assistant cannot be retrieved, typically due to an incorrect Assistant ID or the assistant not existing. It includes a cURL command example for verifying assistant retrieval. ```text Problem: Wrong Assistant ID or doesn't exist. Fix: Run: curl "https://api.vapi.ai/assistant" -H "Authorization: Bearer YOUR_KEY" Use the correct id from the response Don't confuse Credential ID with Assistant ID ``` -------------------------------- ### Complete Call Flow Example (curl) Source: https://www.docs.vobiz.ai/integrations/retellai-api Demonstrates a complete call flow using curl commands, including listing agents, configuring a phone number, and making a call. This example requires replacing placeholders with actual API keys and configuration details. ```bash # 1. List agents curl "https://api.retellai.com/list-agents" \ -H "Authorization: Bearer key_YOUR_KEY_HERE" # 2. Configure phone number (one-time) curl "https://api.retellai.com/create-phone-number" \ -X POST \ -H "Authorization: Bearer key_YOUR_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{ "phone_number": "+1234567890", "phone_number_type": "custom", "outbound_agent_id": "agent_YOUR_AGENT_ID", "sip_outbound_trunk_config": { "termination_uri": "abc123.sip.vobiz.ai", "transport": "TCP", "auth_username": "your_username", "auth_password": "your_password" } }' # 3. Make a call curl "https:/ ``` -------------------------------- ### Get Call Details Source: https://www.docs.vobiz.ai/integrations/vapi-api Retrieves detailed information about a specific call. ```APIDOC ## GET /call/{callId} ### Description Retrieves detailed information about a specific call using its ID. ### Method GET ### Endpoint https://api.vapi.ai/call/{callId} ### Parameters #### Path Parameters - **callId** (string) - Required - The unique identifier of the call. ### Response #### Success Response (200 OK) - **id** (string) - The unique identifier for the call. - **status** (string) - The current status of the call. - **startTime** (string) - The timestamp when the call started. - **endTime** (string) - The timestamp when the call ended (if applicable). - **recordingUrl** (string) - The URL to the call recording (if available). #### Response Example ```json { "id": "call_def456", "status": "completed", "startTime": "2023-10-27T10:00:00Z", "endTime": "2023-10-27T10:05:00Z", "recordingUrl": "https://storage.vapi.ai/recordings/call_def456.mp3" } ``` ``` -------------------------------- ### Troubleshoot Assistant Configuration Issues (Text) Source: https://www.docs.vobiz.ai/integrations/vapi-api This section outlines common problems and their fixes related to assistant configuration for Vobiz AI. It guides users to verify the 'First Message' and voice provider setup in the Vapi dashboard and check call logs for detailed insights. ```text Problem: Assistant configuration issue. Fix: - Verify assistant has "First Message" configured in Vapi dashboard - Check assistant has voice provider set up - View call logs in Vapi Dashboard → Calls ``` -------------------------------- ### Initiate Call Steps Source: https://www.docs.vobiz.ai/integrations/vapi-api This section details the sequential steps required to initiate a call using the Vobiz AI system. It covers starting the process, waiting for the destination phone to ring, answering the call, interacting with the AI assistant, and reviewing the call transcript. ```text Run Step 3 to initiate a call Wait for destination phone to ring Answer the call AI assistant will greet and speak Check call transcript in Vapi Dashboard ``` -------------------------------- ### Example Vobiz AI Agent Response Source: https://www.docs.vobiz.ai/integrations/elevenlabs-api This is an example JSON response when listing your AI agents. It includes the agent ID, name, and conversation configuration, such as the agent's first message and language. ```json [ { "agent_id": "agent_your_agent_id_here", "name": "Customer Support Bot", "conversation_config": { "agent": { "first_message": "Hello! How can I help you today?", "language": "en" } } } ] ``` -------------------------------- ### ElevenLabs Setup and API Key Source: https://www.docs.vobiz.ai/integrations/elevenlabs-api Instructions on how to obtain an ElevenLabs API key and set necessary permissions. ```APIDOC ## ElevenLabs Setup and API Key ### Description This section guides you through obtaining an API key from ElevenLabs and configuring the required permissions for integration with Vobiz. ### Method N/A (Manual Setup) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A **Steps:** 1. **Go to ElevenLabs Settings → API Keys:** Navigate to the API Keys section in your ElevenLabs account settings. 2. **Click Create API Key:** Initiate the creation of a new API key. 3. **Name your key:** Assign a descriptive name, such as "Vobiz Integration". 4. **Set permissions:** - **ElevenLabs Agents:** Write (Required) - **Voices:** Read (Required) - **User:** Read (Optional) 5. **Click Create and copy the key:** Finalize the creation and securely copy your generated API key. **Example API Key:** ```text sk_your_elevenlabs_api_key_here ``` **Important:** Save this key securely as it will be used in all API requests. ``` -------------------------------- ### Example JSON Response for Agent Creation Source: https://www.docs.vobiz.ai/integrations/elevenlabs-api This JSON object represents a successful response after creating an agent. It includes the agent's ID, name, and conversation configuration, which are essential for subsequent API calls. ```json { "agent_id": "agent_your_agent_id_here", "name": "Customer Support Bot", "conversation_config": { "agent": { "first_message": "Hello! Thank you for calling. How can I help you today?", "language": "en" } } } ``` -------------------------------- ### Troubleshoot SIP Authentication Failed Source: https://www.docs.vobiz.ai/integrations/vapi-api This section provides solutions for SIP authentication failures, which are usually caused by incorrect Vobiz credentials. It guides users to verify their SIP domain, username, and password in the Vobiz Console. ```text Problem: Vobiz credentials are incorrect. Fix: Verify SIP domain, username, password in Vobiz Console Ensure you're using the exact sip_domain (e.g., bfab10fb.sip.vobiz.ai) Don't use generic sip.vobiz.ai ``` -------------------------------- ### Troubleshoot Call Connection Failures (Text) Source: https://www.docs.vobiz.ai/integrations/vapi-api This guide addresses issues where calls do not connect. It emphasizes the importance of using the correct phone number format (E.164 or local) and verifying the Vobiz trunk status and CDR logs for troubleshooting. ```text Problem: Wrong phone number format or trunk configuration. Fix: - Use E.164 format: +919148223344 (with +) - Or local format: 09148223344 (without +) - Verify Vobiz trunk is active in Vobiz Console - Check Vobiz CDR logs for call attempts ``` -------------------------------- ### Vapi Integration - API Setup Source: https://www.docs.vobiz.ai/integrations/vapi-api Connect your Vapi AI assistants to Vobiz SIP infrastructure using API/CLI commands for outbound calling. ```APIDOC ## POST /credential ### Description Creates a SIP credential in Vapi to register your Vobiz SIP trunk for outbound calling. ### Method POST ### Endpoint https://api.vapi.ai/credential ### Parameters #### Headers - **Content-Type** (string) - Required - `application/json` - **Authorization** (string) - Required - `Bearer YOUR_VAPI_PRIVATE_KEY` #### Request Body - **provider** (string) - Required - `byo-sip-trunk` - **name** (string) - Required - `Vobiz Trunk` - **gateways** (array) - Required - List of gateways. - **ip** (string) - Required - Your Vobiz SIP domain (e.g., `bfab10fb.sip.vobiz.ai`) - **inboundEnabled** (boolean) - Required - `false` - **outboundLeadingPlusEnabled** (boolean) - Required - `true` - **outboundAuthenticationPlan** (object) - Required - Authentication details. - **authUsername** (string) - Required - Your Vobiz username - **authPassword** (string) - Required - Your Vobiz password ### Request Example ```json { "provider": "byo-sip-trunk", "name": "Vobiz Trunk", "gateways": [ { "ip": "bfab10fb.sip.vobiz.ai", "inboundEnabled": false } ], "outboundLeadingPlusEnabled": true, "outboundAuthenticationPlan": { "authUsername": "Vapi_user", "authPassword": "Password@123" } } ``` ### Response #### Success Response (200) - **id** (string) - The Credential ID for your Vobiz trunk. - **provider** (string) - The provider of the credential. - **gateways** (array) - List of gateways configured. #### Response Example ```json { "id": "65a79bd2-c1b9-4c83-8e55-97c22c092b48", "provider": "byo-sip-trunk", "gateways": [ { "ip": "bfab10fb.sip.vobiz.ai", "inboundEnabled": false } ], "outboundLeadingPlusEnabled": true, "outboundAuthenticationPlan": { "authUsername": "Vapi_user", "authPassword": "Password@123" } } ``` ``` -------------------------------- ### Create Basic Audio Stream (cURL) Source: https://www.docs.vobiz.ai/audio-stream/initiate-audio-stream This example demonstrates how to initiate a basic audio stream using cURL. It requires the service URL and authentication headers. The response includes the stream ID and other stream details. ```bash curl -X POST https://api.vobiz.ai/api/v1/Account/MA_AABBCC/Call/call-uuid-xxxx-yyyy/Stream/ \ -H "X-Auth-ID: YOUR_AUTH_ID" \ -H "X-Auth-Token: YOUR_AUTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "service_url": "wss://yourapp.example.com/audiostream" }' ``` -------------------------------- ### Retell AI Dashboard Setup Link Source: https://www.docs.vobiz.ai/integrations/retellai-api This code snippet represents a link to the Retell AI dashboard setup page. It's typically used within a web application's UI to guide users through the integration process. ```javascript javascript:void(0) ``` -------------------------------- ### Create Bidirectional Stream with Callbacks (cURL) Source: https://www.docs.vobiz.ai/audio-stream/initiate-audio-stream This example shows how to set up a bidirectional audio stream with specified content type and status callback URLs. It enables two-way audio communication and provides real-time status updates. ```bash curl -X POST https://api.vobiz.ai/api/v1/Account/MA_AABBCC/Call/call-uuid-xxxx-yyyy/Stream/ \ -H "X-Auth-ID: YOUR_AUTH_ID" \ -H "X-Auth-Token: YOUR_AUTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "service_url": "wss://yourapp.example.com/audiostream", "bidirectional": true, "audio_track": "inbound", "content_type": "audio/x-l16;rate=16000", "status_url": "https://yourapp.example.com/stream-status", "status_method": "POST" }' ``` -------------------------------- ### List Vapi Assistants via API Source: https://www.docs.vobiz.ai/integrations/vapi-api This command lists all available Vapi assistants. It requires your Vapi private key for authentication. The output will be a list of assistant objects, each containing an ID. ```bash curl "https://api.vapi.ai/assistant" \ -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" ``` -------------------------------- ### Get Call Details Source: https://www.docs.vobiz.ai/integrations/retellai-api Retrieve details for a specific call. ```APIDOC ## GET /get-call/{call_id} ### Description Get call details. ### Method GET ### Endpoint /get-call/{call_id} ### Parameters #### Path Parameters - **call_id** (string) - Required - The ID of the call to retrieve details for. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **call_id** (string) - The ID of the call. - **from_phone_number** (string) - The originating phone number. - **to_phone_number** (string) - The destination phone number. - **agent_id** (string) - The ID of the agent used in the call. - **start_time** (string) - The time the call started. - **end_time** (string) - The time the call ended. - **status** (string) - The final status of the call. #### Response Example ```json { "call_id": "call_def456", "from_phone_number": "+1234567890", "to_phone_number": "+1987654321", "agent_id": "agent_abc123", "start_time": "2023-10-27T10:00:00Z", "end_time": "2023-10-27T10:05:00Z", "status": "completed" } ``` ``` -------------------------------- ### Get Call Details API Endpoint Source: https://www.docs.vobiz.ai/integrations/retellai-api Retrieves details for a specific phone call using its ID. This is a GET request that includes the call ID in the URL path. ```HTTP GET /get-call/{call_id} ``` -------------------------------- ### Troubleshooting: Call Fails Immediately Source: https://www.docs.vobiz.ai/integrations/retellai-api This section details common causes and solutions for calls failing immediately after initiation. ```APIDOC ## GET /llmstxt/vobiz_ai_llms_txt/call-fails-immediately ### Description Helps diagnose and resolve issues where calls fail immediately. It covers common problems like incorrect SIP credentials, transport types, SIP domains, and insufficient balance. ### Method GET ### Endpoint /llmstxt/vobiz_ai_llms_txt/call-fails-immediately ### Parameters #### Query Parameters - **cause_id** (integer) - Optional - Specifies a particular cause to focus on. ### Response #### Success Response (200) - **message** (string) - A general message about call failure troubleshooting. - **possible_causes** (array) - A list of potential reasons for call failure. - **id** (integer) - Unique identifier for the cause. - **title** (string) - A brief title for the cause. - **description** (string) - A more detailed explanation of the cause. - **solutions** (array) - A list of recommended solutions for the cause. - **solution_description** (string) - Description of a solution step. - **reference_link** (string) - URL to relevant documentation or console. - **example_code** (string) - Example of correct configuration (e.g., transport type). #### Response Example { "message": "Call fails immediately", "possible_causes": [ { "id": 1, "title": "Wrong SIP credentials", "description": "Ensure your Vobiz username and password are correct.", "solutions": [ { "solution_description": "Verify Vobiz username/password at Vobiz Console", "reference_link": "https://console.vobiz.ai" } ] }, { "id": 2, "title": "Wrong transport type", "description": "Try using UDP instead of TCP for the transport type in your trunk configuration.", "solutions": [ { "solution_description": "Try \"UDP\" instead of \"TCP\" in trunk config", "example_code": "UDP" } ] }, { "id": 3, "title": "SIP domain incorrect", "description": "The SIP domain must be the exact Vobiz domain and should not include the 'sip:' prefix.", "solutions": [ { "solution_description": "Must be exact Vobiz domain (e.g., abc123.sip.vobiz.ai)", "example_code": "abc123.sip.vobiz.ai" }, { "solution_description": "Do NOT include 'sip:' prefix" } ] }, { "id": 4, "title": "Insufficient balance", "description": "Check if your Vobiz account has sufficient credits.", "solutions": [ { "solution_description": "Check Vobiz account has credits at Vobiz Console", "reference_link": "https://console.vobiz.ai" }, { "solution_description": "See $L15" } ] } ] } ``` -------------------------------- ### Get Call Details Source: https://www.docs.vobiz.ai/integrations/vapi-api Retrieves detailed information about a specific call using its call ID. ```APIDOC ## GET /call/{callId} ### Description Retrieves the status and details of a specific call using its unique call ID. This endpoint is useful for monitoring call progress and retrieving post-call information. ### Method GET ### Endpoint https://api.vapi.ai/call/{callId} ### Parameters #### Path Parameters - **callId** (string) - Required - The unique identifier of the call to retrieve details for. ### Request Example ``` curl -X GET "https://api.vapi.ai/call/019a0bce-0cf3-7337-a253-f65f4e9c68f4" \ -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the call. - **status** (string) - The current status of the call (e.g., "completed", "in_progress", "failed"). - **startTime** (string) - The timestamp when the call started. - **endTime** (string) - The timestamp when the call ended (if applicable). - **duration** (integer) - The duration of the call in seconds (if applicable). - **transcript** (string) - The full transcript of the conversation (if available). #### Response Example ```json { "id": "019a0bce-0cf3-7337-a253-f65f4e9c68f4", "status": "completed", "startTime": "2023-10-27T10:00:00Z", "endTime": "2023-10-27T10:05:30Z", "duration": 330, "assistantId": "9fb6d4c5-9403-49ea-afeb-9b493d63b474", "customer": { "number": "+919148223344" }, "phoneNumberId": "91122039-9644-47fd-a545-d865075a6941", "transcript": "Customer: Hello, I have a question about my order... Assistant: Hello, I can help you with that..." } ``` ``` -------------------------------- ### Place a Call using cURL Source: https://www.docs.vobiz.ai/call/make-call This example shows how to make an API request to place a call using cURL. It includes the necessary HTTP headers for authentication and content type, along with a JSON payload for the call details. This is a common method for programmatic call initiation. ```bash curl -X POST https://api.vobiz.ai/api/v1/Account/{Auth_ID}/Call/ \ -H "X-Auth-ID: YOUR_AUTH_ID" \ -H "X-Auth-Token: YOUR_AUTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from": "14155551234", "to": "14155555678", "answer_url": "https://example.com/answer", "answer_method": "POST" }' ``` -------------------------------- ### Get Call Details API Endpoint (cURL) Source: https://www.docs.vobiz.ai/integrations/retellai-api This cURL command retrieves the details of a specific call using its unique 'call_id'. It requires your API key for authentication and uses the GET method on the '/get-call/{call_id}' endpoint. ```shell curl "https://api.retellai.com/get-call/{call_id}" \ -H "Authorization: Bearer key_YOUR_KEY_HERE" ``` -------------------------------- ### List Agents API Endpoint Source: https://www.docs.vobiz.ai/integrations/retellai-api Retrieves a list of all configured agents. This is a GET request and does not require a request body. ```HTTP GET /list-agents ``` -------------------------------- ### Create Advanced Stream with Extra Headers (cURL) Source: https://www.docs.vobiz.ai/audio-stream/initiate-audio-stream This example demonstrates creating an advanced audio stream with a specified timeout, content type, and custom extra headers for session management. It also includes a status URL for monitoring. ```bash curl -X POST https://api.vobiz.ai/api/v1/Account/MA_AABBCC/Call/call-uuid-xxxx-yyyy/Stream/ \ -H "X-Auth-ID: YOUR_AUTH_ID" \ -H "X-Auth-Token: YOUR_AUTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "service_url": "wss://yourapp.example.com/audiostream", "bidirectional": false, "audio_track": "both", "stream_timeout": 3600, "content_type": "audio/x-l16;rate=16000", "extra_headers": "sessionid=abc123,userid=xyz789", "status_url": "https://yourapp.example.com/stream-status" }' ``` -------------------------------- ### Get Call Details API Source: https://www.docs.vobiz.ai/integrations/retellai-api Retrieve the current details and status of a specific call using its unique call ID. ```APIDOC ## GET /get-call/{call_id} ### Description Retrieves the details and current status of a specific call using its unique call ID. ### Method GET ### Endpoint https://api.retellai.com/get-call/{call_id} ### Parameters #### Path Parameters - **call_id** (string) - Required - The unique identifier for the call. ### Response #### Success Response (200) - **call_id** (string) - Unique identifier for the call. - **call_status** (string) - The current status of the call (e.g., `"registered"`, `"ringing"`, `"ongoing"`, `"ended"`). - **from_number** (string) - The caller ID number. - **to_number** (string) - The destination number. - **direction** (string) - The direction of the call (`"outbound"`). #### Response Example ```json { "call_id": "call_abc123xyz789", "call_status": "ongoing", "from_number": "+1234567890", "to_number": "+10987654321", "direction": "outbound" } ``` ``` -------------------------------- ### Create Phone Number Source: https://www.docs.vobiz.ai/integrations/retellai-api Add a phone number with SIP trunk configuration. ```APIDOC ## POST /create-phone-number ### Description Add phone number with SIP trunk. ### Method POST ### Endpoint /create-phone-number ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **phone_number** (string) - Required - The phone number to configure. - **phone_number_type** (string) - Required - The type of phone number (e.g., "custom"). - **outbound_agent_id** (string) - Required - The ID of the agent to use for outbound calls. - **sip_outbound_trunk_config** (object) - Required - Configuration for the SIP outbound trunk. - **termination_uri** (string) - Required - The termination URI for the SIP trunk. - **transport** (string) - Required - The transport protocol (e.g., "TCP"). - **auth_username** (string) - Required - The username for SIP authentication. - **auth_password** (string) - Required - The password for SIP authentication. ### Request Example ```json { "phone_number": "+1234567890", "phone_number_type": "custom", "outbound_agent_id": "agent_YOUR_AGENT_ID", "sip_outbound_trunk_config": { "termination_uri": "abc123.sip.vobiz.ai", "transport": "TCP", "auth_username": "your_username", "auth_password": "your_password" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **phone_number_id** (string) - The ID of the created phone number. #### Response Example ```json { "message": "Phone number configured successfully.", "phone_number_id": "pn_xyz789" } ``` ``` -------------------------------- ### List Available Agents Source: https://www.docs.vobiz.ai/integrations/retellai-api Retrieve all agents to get the agent_id you'll use for calls. This is a necessary step before initiating any calls. ```APIDOC ## List Available Agents ### Description Retrieve all agents to get the `agent_id` you'll use for calls. ### Method GET ### Endpoint https://api.retellai.com/list-agents ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl "https://api.retellai.com/list-agents" \ -H "Authorization: Bearer key_abc123xyz789example" ``` ### Response #### Success Response (200) - **agent_id** (string) - The unique identifier for the agent. - **agent_name** (string) - The human-readable name of the agent. - **voice_id** (string) - The voice identifier used by the agent. - **language** (string) - The language configured for the agent. #### Response Example ```json [ { "agent_id": "agent_abc123example", "agent_name": "Customer Support Agent", "voice_id": "11labs-Rachel", "language": "en-US" } ] ``` ``` -------------------------------- ### Troubleshooting: Assistant Configuration Issue Source: https://www.docs.vobiz.ai/integrations/vapi-api Provides steps to resolve issues where the assistant is not configured correctly, leading to problems with call initiation. ```APIDOC ## Troubleshooting: Assistant Configuration Issue ### Description If your calls are not connecting or the assistant is not functioning as expected, verify the assistant's configuration in the Vapi dashboard. ### Problem Assistant configuration issue. ### Fix * Verify assistant has "First Message" configured in Vapi dashboard. * Check assistant has voice provider set up. * View call logs in [Vapi Dashboard](https://dashboard.vapi.ai) → Calls. ``` -------------------------------- ### Create Phone Call Source: https://www.docs.vobiz.ai/integrations/retellai-api Make an outbound call. ```APIDOC ## POST /v2/create-phone-call ### Description Make an outbound call. ### Method POST ### Endpoint /v2/create-phone-call ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **from_phone_number** (string) - Required - The phone number to call from. - **to_phone_number** (string) - Required - The phone number to call. - **agent_id** (string) - Required - The ID of the agent to use for the call. - **prompt** (string) - Optional - The initial prompt for the agent. ### Request Example ```json { "from_phone_number": "+1234567890", "to_phone_number": "+1987654321", "agent_id": "agent_abc123", "prompt": "Hello, how can I help you today?" } ``` ### Response #### Success Response (200) - **call_id** (string) - The ID of the initiated call. - **status** (string) - The status of the call. #### Response Example ```json { "call_id": "call_def456", "status": "initiated" } ``` ``` -------------------------------- ### List Phone Numbers API Endpoint Source: https://www.docs.vobiz.ai/integrations/retellai-api Retrieves a list of configured phone numbers. This is a GET request and does not require a request body. ```HTTP GET /list-phone-numbers ``` -------------------------------- ### List Assistants Source: https://www.docs.vobiz.ai/integrations/vapi-api Retrieves a list of all available assistants configured in Vapi. ```APIDOC ## GET /assistant ### Description Retrieves a list of all assistants configured within your Vapi account. This is useful for obtaining assistant IDs required for making calls. ### Method GET ### Endpoint https://api.vapi.ai/assistant ### Parameters No parameters required. ### Request Example ``` curl -X GET "https://api.vapi.ai/assistant" \ -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" ``` ### Response #### Success Response (200) - **assistants** (array) - A list of assistant objects, each containing details like `id`, `name`, etc. #### Response Example ```json [ { "id": "9fb6d4c5-9403-49ea-afeb-9b493d63b474", "name": "Sales Assistant", "model": "gpt-4o", "voice": "alloy", "description": "Assists with sales inquiries." }, { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Support Bot", "model": "claude-3-opus", "voice": "shimmer", "description": "Handles customer support requests." } ] ``` ``` -------------------------------- ### Get Call Details with Vapi Source: https://www.docs.vobiz.ai/integrations/vapi-api Retrieves the details of a specific call using its ID. This API call requires your Vapi private key and the call ID. ```bash curl "https://api.vapi.ai/call/019a0bce-0cf3-7337-a253-f65f4e9c68f4" \ -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" ``` -------------------------------- ### List Voices API Endpoint Source: https://www.docs.vobiz.ai/integrations/elevenlabs-api Retrieves a list of available voices from the ElevenLabs API. This is a GET request that requires an API key for authentication. ```bash curl \"https://api.elevenlabs.io/v1/voices\" \ -H \"xi-api-key: sk_your_elevenlabs_api_key_here\"\ # Save a voice_id from the response ``` -------------------------------- ### Troubleshooting API Issues Source: https://www.docs.vobiz.ai/integrations/vapi-api This section details common problems encountered when using the Vobiz AI LLMs Text API and provides solutions. ```APIDOC ## Troubleshooting API Issues ### Description This section details common problems encountered when using the Vobiz AI LLMs Text API and provides solutions. ### Unauthorized / Invalid API Key #### Problem Vapi Private Key is incorrect. #### Fix - Verify you copied the entire key - Generate new key at [Vapi Dashboard](https://dashboard.vapi.ai) → Settings → API Keys ### Couldn't Get Assistant #### Problem Wrong Assistant ID or doesn't exist. #### Fix - Run: `curl "https://api.vapi.ai/assistant" -H "Authorization: Bearer YOUR_KEY"` - Use the correct `id` from the response - Don't confuse Credential ID with Assistant ID ### SIP Authentication Failed #### Problem Vobiz credentials are incorrect. #### Fix - Verify SIP domain, username, password in [Vobiz Console](https://console.vobiz.ai) - Ensure you're using the exact `sip_domain` (e.g., `bfab10fb.sip.vobiz.ai`) - Don't use generic `sip.vobiz.ai` ``` -------------------------------- ### ElevenLabs Phone Number Import Response Example Source: https://www.docs.vobiz.ai/integrations/elevenlabs-api This is an example JSON response received after successfully importing a phone number via the ElevenLabs API. It confirms the phone number details, label, and whether it supports outbound and inbound calls. The 'phone_number_id' is a key identifier to be saved for future use. ```json { \"phone_number_id\": \"phnum_your_phone_number_id_here\", \"phone_number\": \"+911234567890\", \"label\": \"Vobiz Main Line\", \"supports_outbound\": true, \"supports_inbound\": true, \"provider\": \"sip_trunk\" } ```