Attach files to agent via API?
# support
j
Is it possible to attach files to the agent via the API? I can't seem to update the contents of a file via the API (please correct me if I'm wrong). So my workaround would be to create a file, unlink the old file, and link the newly uploaded file to the agent and update it once a week or two. I'm doing this for an employee directory so that VAPI doesn't have to do any tool calls and can just rely on the directory that won't change very often. I have about 300 or so names and numbers, some get removed and some get added over time.
v
Based on the documentation I have found, you cannot update the contents of a file via the Vapi API—the PATCH endpoint only allows updating the file's name, not its content ([Vapi API documentation](https://docs.vapi.ai/api-reference/files/update)). Additionally, there is no available information about attaching, linking, or unlinking files to a Vapi agent via the API. Could you clarify if you are looking for alternative ways to manage your employee directory within Vapi, given these limitations? Source: - [Vapi API documentation Update File](https://docs.vapi.ai/api-reference/files/update)
Based on the documentation I have found, you cannot update the contents of a file via the Vapi API—the PATCH endpoint only allows updating the file's name, not its content ([Vapi API documentation](https://docs.vapi.ai/api-reference/files/update)). Additionally, there is no available information about attaching, linking, or unlinking files to a Vapi agent via the API. Could you clarify if you are looking for alternative ways to manage your employee directory within Vapi, given these limitations? Source: - [Vapi API documentation Update File](https://docs.vapi.ai/api-reference/files/update)
j
Yeah, what are other ways that I can manage an employee directory? Should it be a tool call?
v
Hey, Could you please schedule a brief call at your convenience so we can discuss this matter in detail? Kindly use the following link to book a suitable time: .
j
It looks like you only have times available a month from now, that's not going to be much help for me.
v
You can either utilize a knowledge base with your employee directory file, or connect a google sheet tool call to fetch the information. Would you like to try out any of those suggestions?
j
Are you an AI? I don't see a google sheets tool that allows me to look up information, only append a row. And I also don't see a way to update a knowledge base file.
v
Unfortunately, I am not. For the google sheets idea, you would have to use an MCP tool or use an external service such as zapier/n8n/make.com with a connection to the sheet. For knowledge base, with native configuration you would have to delete and re-upload the file whenever there is a change. Another option I didn't think about until now was embedding the directory within the assistant prompt and that way you wouldn't have to go through the trouble of updating the knowledge base or configuring the google sheets integration, but that decision is entirely up to you and how you want to manage your data.
2 Views