Is there a way to link a phone number to an assist...
# support
d
This is super easy to do on the dashboard (i.e. just say that a number corresponds to a given assistant) but there's nothing in the API documentation for this. Would be great if I'm wrong or if you could add this.
v
Yes, you can link a phone number to an assistant through the API using the
POST /phone-number
endpoint. Here's how:
Copy code
json
curl --location 'https://api.vapi.ai/phone-number' \
--header 'Authorization: Bearer your-vapi-private-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "provider": "vapi",
  "sipUri": "sip:username@sip.vapi.ai",
  "assistantId": "your-assistant-id"
}'
According to [Vapi documentation](https://docs.vapi.ai/advanced/sip), you can provide an
assistantId
to a phone number, and it will use that assistant when receiving inbound calls. Sources: - [Vapi SIP Documentation](https://docs.vapi.ai/advanced/sip) - [Vapi Phone Calling Documentation](https://docs.vapi.ai/phone-calling)
k
Yes, you can link a phone number to your assistant via API by using the
PATCH /phone-number/:id
endpoint and setting the
assistantId
in the request body.