JoachimChauvet
10/28/2025, 4:37 PMVapi Support Bot
10/28/2025, 4:39 PMjavascript
app.post("/api/assistant-selector", (req, res) => {
const calledNumber = req.body.call.to.phoneNumber;
res.json({
assistantId: "your-assistant-id",
assistantOverrides: {
variableValues: { calledNumber }
}
});
});
Now you can use {{calledNumber}} in your assistant's prompts.
This approach gives you the called number as a variable for use in your assistant's messages ([documentation](https://docs.vapi.ai/assistants/personalization)).
Source:
- [Personalization with user information](https://docs.vapi.ai/assistants/personalization)Chiranjeet Mishra
10/29/2025, 8:02 PMGET request to the /phone-number/{id} endpoint. Ensure you include the phone number ID in the path and the authorization token in the header. Here's a quick example in Python:
python
from vapi import Vapi
client = Vapi(token="YOUR_API_KEY")
response = client.phone_numbers.get(id="PHONE_NUMBER_ID")
For more detailed information, you can refer to the [Get Phone Number API documentation](https://docs.vapi.ai/api-reference/phone-numbers/get).