JSON Format - Assistent/Outbound call
# support
t
{ "id": "7c3d8aec-221b-471d-86ff-6f9b721e41dc", "assistantId": "f041015a-a095-4a85-a9ff-8941d2eca131", "phoneNumberId": "fdce4182-c8a7-49e6-a0b0-25762a6a39ae", "type": "outboundPhoneCall", "createdAt": "2025-06-03T20:23:59.035Z", "updatedAt": "2025-06-03T20:23:59.035Z", "orgId": "1ce49a17-de8e-4a9d-b360-f8d7b76a96c5", "cost": 0, "customer": { "name": "Jose silva", "number": "+5511968936973" }, "status": "queued", "phoneCallProvider": "vapi", "phoneCallProviderId": "e5da9993-6bc3-4184-aa06-b1c537b9d71f", "phoneCallTransport": "pstn", "phoneCallProviderDetails": { "sbcCallId": "85a7e938-bb5b-123e-50b5-023a5647b4e9" }, "assistantOverrides": { "variableValues": { "nome": "VANISA ANGELICA PEREIRA DE SOUZA", "email": "vanisapsouza@gmail.com", "placa": "FGA8E15", "modelo": "Tracker", "status": "P", "celular": "97268858111", "id_loja": 1171, "cpf_cnpj": "26854926823", "telefone": "1136723936", "nome_loja": "BARRA FUNDA - AV. ANTARTICA 62", "id_pesquisa": 7026547, "data_servico": "26/05/2025", "nome_gerente": "DIEGO SANTOS", "id_instituicao": 5, "id_questionario": 225, "id_tipo_pesquisa": 7, "telefone_gerente": "" }}, "monitor": { "listenUrl": "wss://phone-call-websocket.aws-us-west-2-backend-production2.vapi.ai/7c3d8aec-221b-471d-86ff-6f9b721e41dc/listen", "controlUrl": "https://phone-call-websocket.aws-us-west-2-backend-production2.vapi.ai/7c3d8aec-221b-471d-86ff-6f9b721e41dc/control" }, "transport": { "callSid": "e5da9993-6bc3-4184-aa06-b1c537b9d71f", "provider": "vapi.sip", "sbcCallSid": "85a7e938-bb5b-123e-50b5-023a5647b4e9"}} Our team are going through a test fase here in our operation. We are using a SIP Trunk connection phone number to prospect an outbound lead call. We are using this Json to make the call and with these variables we want to be sent to an automation workflow. Is this an approved/valid Json format?
v
Your JSON includes all the required fields for an outbound call, but for the Vapi API, only a minimal set is needed. Here’s a **valid example**:
Copy code
json
{
  "assistantId": "your-assistant-id",
  "phoneNumberId": "your-phone-number-id",
  "customer": { "number": "+5511968936973" },
  "assistantOverrides": {
    "variableValues": {
      "nome": "VANISA ANGELICA PEREIRA DE SOUZA"
      // ...other variables
    }
  }
}
Extra fields like
id
,
createdAt
,
status
,
monitor
, and
transport
are not required and may be ignored by the API. For best results, stick to the documented structure above when making outbound calls with variables to your workflow. Sources: - [Vapi Outbound Calling Documentation](https://docs.vapi.ai/calls/outbound-calling) - [Vapi API Reference: Create Phone Call](https://docs.vapi.ai/api-reference/calls/create-phone-call) - [Vapi Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables)
c
Hi Teru, To set up an outbound call using JSON with your assistant and phone number setup, you'll need to ensure your JSON structure aligns with the API requirements. Here's a basic structure you should follow for an outboundPhoneCall setup:
Copy code
json
{
  "assistantId": "f041015a-a095-4a85-a9ff-8941d2eca131",
  "phoneNumberId": "fdce4182-c8a7-49e6-a0b0-25762a6a39ae",
  "customer": {
    "name": "Jose Silva",
    "number": "+5511968936973"
  },
  "type": "outboundPhoneCall",
  "status": "queued",
  "phoneCallProvider": "vapi"
}
A few key points to ensure everything works smoothly: - Ensure your
assistantId
and
phoneNumberId
are correctly set and exist in your system. - The
customer.number
should be in E.164 format, as you've provided. - Make sure your bearer token is included in the Authorization header of your API request. This setup should trigger your outbound call properly. You can find more details in the [API Reference for Calls](https://docs.vapi.ai/api-reference/calls/create).
t
Thank you. @User for the quick response. To ensure the requirements of our operations. all these variables are needed: "variableValues": { "nome": "VANISA ANGELICA PEREIRA DE SOUZA", "email": "vanisapsouza@gmail.com", "placa": "FGA8E15", "modelo": "Tracker", "status": "P", "celular": "97268858111", "id_loja": 1171, "cpf_cnpj": "26854926823", "telefone": "1136723936", "nome_loja": "BARRA FUNDA - AV. ANTARTICA 62", "id_pesquisa": 7026547, "data_servico": "26/05/2025", "nome_gerente": "DIEGO SANTOS", "id_instituicao": 5, "id_questionario": 225, "id_tipo_pesquisa": 7, "telefone_gerente": "" Can I send to VAPI as well?
k
Yes, you can send variableValues to Vapi by including them inside "assistantOverrides" in your outbound call JSON, this allows your assistant to dynamically use those values during the call..
s
Do we also need to include the tools and server webhook info in the JSON for outbound calls? Or does the assistantID itself do the work and picks up the tools / webhook and other configurations?
t
@SK thanks man. That was my next question. If we could use those variables could to be sent to n8n workflows and how.
s
I'm using those variables now in JSON and they work. But I'm wondering if the assissantID picks up those configurations
c
Hey Teru, checking if this is resolved/solved for you?
4 Views