Can I group assistants by client?
# support
r
I run a software company and create multiple assistants for each customer. Is there a way to add metadata to each assistant to track assistants by customer? I keep track of that in my database, but it would be nice to be able to fetch assistants buy this metadata and list calls by this metadata.
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
v
Yes, you can add custom metadata to each assistant to track them by customer. When creating or updating an assistant, include a
metadata
field with your client information. For example:
Copy code
json
{
  "name": "Support Assistant",
  "metadata": {
    "customerId": "client-123",
    "clientName": "Acme Corp"
  }
}
This lets you group and identify assistants by client in your system. Note: The API supports storing metadata, but direct filtering by metadata is not documented in the API reference. Source: - [Create Assistant API Reference](https://docs.vapi.ai/api-reference/assistants/create-assistant)
v
Message marked as helpful by @RyGuy! 🎉
r
Thanks. Now, how can I list calls by querying by that metadata?
@Vapi Support Bot how can I list calls by querying by that metadata?
v
Thanks for your question! Just to clarify, are you currently storing the
customerId
as a top-level field on your calls (not just in assistant metadata), or do you need to filter calls based solely on metadata attached to assistants? Source: - [Create Assistant API Reference](https://docs.vapi.ai/api-reference/assistants/create-assistant)
r
No, I'm not storing customerId on my calls. I'm storing it on my assistants. I'd like to filter calls based on metadata attached to my assistants. @User
@Vapi Support Bot No, I'm not storing customerId on my calls. I'm storing it on my assistants. I'd like to filter calls based on metadata attached to my assistants.
@User Support Bot No, I'm not storing customerId on my calls. I'm storing it on my assistants. I'd like to filter calls based on metadata attached to my assistants.
@Vapi Support Bot No, I'm not storing customerId on my calls. I'm storing it on my assistants. I'd like to filter calls based on metadata attached to my assistants