500 Error When Creating Customer with assistantOve...
# support
r
Hi VAPI Support Team, I’m encountering an issue when creating Customer objects via the API. The request works successfully when I include only name and number, but it returns a 500 Internal Server Error whenever I include assistantOverrides.variableValues. orgId: 727f8c9d-9632-4e41-9268-1919aa9c97c7 Below are the details: ===================================================== ✅ This works: Request:POST https://api.vapi.ai/customer { "name": "jonny", "number": "+19174761638" } Response: { "id": "87011052-9735-41bd-93d2-5b4422b56365", "orgId": "727f8c9d-9632-4e41-9268-1919aa9c97c7", "number": "+19174761638", "createdAt": "2025-10-08T01:32:13.207Z", "updatedAt": "2025-10-08T01:32:13.207Z", "name": "jonny" } ================================================== ❌ This fails: Request:POST https://api.vapi.ai/customer { "name": "jonny", "number": "+19174761638", "assistantOverrides": { "variableValues": { "Cur_State": "NY" } } } Response: { "statusCode": 500, "message": "Internal server error. Contact support@vapi.ai for help." } ================================================= Could you please confirm what am I missing? Thank you for your help! Best regards, Ronak Shah shah.ronak@columbia.edu https://cdn.discordapp.com/attachments/1425297093270179923/1425297093643468922/image.png?ex=68e712db&is=68e5c15b&hm=7b9d884c588edec2af2f9627c607ab85d1d3b7789044dba0a3e2ef972722f57e& https://cdn.discordapp.com/attachments/1425297093270179923/1425297094184276068/image.png?ex=68e712db&is=68e5c15b&hm=456fecae4950185043c9fe095823bde68c7242390f4c4046bb597cbba4dd97cb&
@Vapi Support Bot
v
It appears that the
assistantOverrides
property—especially with `variableValues`—may not be supported when creating a customer via the
/customer
endpoint, as most documentation examples use it in call or campaign creation contexts. As a next step, try creating the customer without
assistantOverrides
, then apply personalization at the call level:
Copy code
json
{
  "assistantId": "your-assistant-id",
  "assistantOverrides": {
    "variableValues": {
      "Cur_State": "NY"
    }
  },
  "customer": {
    "id": "customer-id"
  },
  "phoneNumberId": "your-phone-id"
}
Apply dynamic variables when starting a call, not during customer creation. If you need to personalize at the customer level, please contact support@vapi.ai for confirmation on schema support or possible workarounds. Sources: - [Personalization with user information](https://docs.vapi.ai/assistants/personalization) - [Dynamic variables documentation](https://docs.vapi.ai/assistants/dynamic-variables)
Thank you for the detailed information! To help diagnose the 500 error, could you confirm whether the variable
Cur_State
is defined in your assistant's configuration as a dynamic variable? If not, the API may not recognize it, which can cause errors. If you’re unsure, please check your assistant setup for a list of supported variables or let me know if you need guidance on where to find this in the dashboard. Example variable definition in assistant config:
Copy code
{{Cur_State}}
Let me know if
Cur_State
is present or if you need help checking this! Source: - [Dynamic Variables Documentation](https://docs.vapi.ai/assistants/dynamic-variables)
v
Hey Ronak, I can help you fix this. The 500 error often happens when the variable isn’t defined in the assistant’s settings. Can you confirm if your assistant includes Cur_State as a variable? Once I know that, I’ll assist you with the correct payload format. @ronaks2309
r
Hi @Vercel Thanks for your prompt response. I'm only using this custom variable in the System Prompt like {{Cus_State}}. Not sure where I can define this variable in the assistant... Happy to go over this on DM