Skip to main content
Before you begin, ensure you’ve already purchased and imported phone numbers from Twilio by following the previous setup guides.

🔗 Bind Voice Agents

To enable calling, you must bind a voice agent to the number.
Without an assigned agent, the number cannot make or receive calls.
  • You can assign different agents for inbound and outbound calls.
  • To disable inbound or outbound:
    • Leave inboundAgentId or outboundAgentId unset.
    • Example: If you only want to make calls but not receive callbacks, leave inboundAgentId unset. Agent Assigned
    Once an inbound agent is assigned, inbound calls will begin working automatically.

☎️ Make Outbound Call

You can initiate outbound calls using the Create Phone Number API or all the parameters you can use.
  • phoneId : The internal ID of the phone number you imported or purchased and registered in Sell Agent.
  • phoneNumber : The destination number you want to call, in E.164 format (e.g., +12135551234).
  • agentId : The ID of the AI agent that should handle the call. This is the agent that will speak on the call.
  • Node.js
  • Python
const options = {
  method: 'POST',
  headers: {
    'x-api-key': '<x-api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    phoneId: "<string>",
    phoneNumber: "+14155551234",
    agentId: "<string>"
  })
};

fetch('https://server.sellagent.ai/api/phone/createCall', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

🔄 Add Webhook for Post-call Events

You can optionally set a webhookURL in your agent configuration. This webhook is triggered after each call ends, sending the full call transcript and other metadata to your server.

🛠️ Option 1: Programmatically

Set the webhook when creating or updating the agent:
"webhookURL": "https://example.com/webhook"

⚙️ Option 2: Through Agent Settings UI

You can also configure the webhook directly in the dashboard under Agent Settings: Agent Webhook Once configured, Sell Agent will send a POST request to your webhook after every inbound or outbound call, including transcript, duration, result, and more. To see the full list of available agent parameters, check the Update Agent API.