one.hedge
03/06/2025, 9:58 PMVapi Support Bot
03/06/2025, 9:59 PMhttps://api.vapi.ai/assistants/{assistantId}
- Replace {assistantId}
with your assistant's actual ID.
- HTTP Method: Use either PUT or PATCH to update the assistant.
### Request Payload
You need to include the system prompt in your request payload as part of a JSON object. Here’s an example of how to structure it:
json
{
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a smart assistant who responds to user queries using the information you know, or information supplied by outside context."
}
]
}
}
### Curl Example
Here’s a Curl command to update the assistant’s system prompt:
bash
curl --location --request PATCH 'https://api.vapi.ai/assistants/{assistantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--data '{
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "insert-your-system-prompt-here"
}
],
"temperature": 0.2
}
}'
Make sure to replace {assistantId}
and YOUR_API_TOKEN
with your actual values.
### Key Considerations
1. Ensure that the field names and structure match the Vapi API documentation, as they are case-sensitive.
2. If you encounter issues, check for any error messages that might indicate what went wrong with the update.
For more detailed information, you can refer to the [Vapi API documentation](https://docs.vapi.ai/api-reference/assistants/update).
Source:
- [Vapi API Reference Update Assistants](https://docs.vapi.ai/api-reference/assistants/update)Vapi Support Bot
03/06/2025, 10:03 PMShubham Bajaj
03/08/2025, 12:45 AM