Skip to main content
Add a custom function (tool) to a phone number so the AI can call your own HTTPS endpoint during a call and use the result. Configured per phone number. Up to 15 functions per number.

Add a custom function

string
required
The phone number in E.164 format, passed in the URL.
string
required
Tool name in snake_case (lowercase letters, numbers, underscores), max 64 characters. Must be unique on the number.
string
required
Your HTTPS endpoint the AI will call. https only.
string
Tells the AI when to call this tool. A clear, specific description is how the AI picks the right tool.
string
default:"POST"
HTTP method: GET, POST, PUT, PATCH, or DELETE.
object
JSON Schema for the arguments the AI collects. Defaults to an empty object schema.
object
Optional headers sent with the request (for example an API key). Values support {{variable}} substitution.
string
What the AI says out loud while the function runs. Prevents silence on slow calls. Optional.
integer
default:"5000"
How long to wait for your endpoint, in milliseconds. Clamped to 1000-45000 (1-45 seconds).
boolean
default:"true"
Whether the function is available on calls.
Returns 409 if a function with that name already exists on the number, or a limit_reached error if the number already has 15 functions.

List custom functions

Edit a custom function

Update one or more fields of an existing function by its id. Only the fields you send are changed; everything else stays the same.
Editable fields: name, description, url, method, headers, parameters, speak_during, timeout_ms, is_active. Returns 404 if the function id is not found on the number, or 409 if the new name clashes with an existing function on that number.

Remove a custom function

Delete a specific function by its id:

Notes

  • The number must belong to your account. A number you do not own returns 404.
  • For how custom functions work in a call, see Custom functions.