Update assistant prompt via sdk
# support
d
How to update the assistant prompt via sdk, dont find any docs for that
@Vapi @Vapi Support Bot
j
i=0 for new_prompt,created_assistant_id,first_name,gender in zip(new_prompts,created_assistant_id_list,df[0:17]['First Name'],df[0:17]['Gender']): i+=1 # Update Assistant (PATCH /assistant/:id) new_model_json = base_assistant_json.copy() new_model_json['model']['messages'] = [{'role':'system','content':new_prompt}] if gender == 'male': desired_voice_id = male_voice_id else: desired_voice_id = female_voice_id new_model_json['voice']['voiceId']=desired_voice_id new_model_json['name'] = f'Medicare Customer Profile {i}' new_model_json['firstMessage']=f'Hello this is {first_name} speaking' response = requests.patch( f"https://api.vapi.ai/assistant/{created_assistant_id}", headers={ "Authorization": f"Bearer {os.getenv('VAPI_AUTH')}" }, json=new_model_json ) print(response.json())
heres a snippet from one of my scripts
patch to created_assistant_id with the updated json
c
Hey Diogo Azevedo, I wanted to let you know that we're managing a high volume of support requests at the moment, so our response time might be a bit slower than usual. I truly appreciate your understanding and will get back to you as soon as possible!  Thanks again for your patience!
To update an assistant prompt via the SDK, ensure that you are using the correct properties and methods provided by the SDK documentation. While the specific property
systemPrompt
isn't directly mentioned in the changelogs, you can update the prompt using transient assistants or by overriding the assistant's settings when initialized. You might want to check recent updates, as outlined in the Vapi [changelog](https://docs.vapi.ai/changelog/2025/4/29), that explain updated schema configurations which might include using the property
systemPrompt
or similar during the assistant setup. Ensure that you are working with the latest version of the SDK and any relevant methods for setting up or initializing your assistant with a prompt..
5 Views