Skip to main content
POST
Attach Numbers to Agent

Overview

Points one or more of your phone numbers at the agent so inbound calls run it. Any existing pathway or persona assignment on those numbers is replaced. Calls answer with the agent’s production version once one is promoted; until then they run the newest version saved on the dev timeline at the time of the attach, so re-attach after saving to refresh it. The agent must have at least one saved version. Use Detach Numbers from Agent to undo. Requires an admin, owner, operator, or prompter role.

Headers

string
required
Your API key for authentication.

Path Parameters

string
required
The agent’s unique identifier.

Body Parameters

string[]
required
Phone numbers to attach, each exactly as it appears on your account (for example +18005551234). Must be a non-empty array of non-empty strings; surrounding whitespace is trimmed. Returns 400 INVALID_BODY if the array is missing, empty, or contains a non-string. Returns 400 INVALID_INBOUND_NUMBERS if any number is not on your account, in which case nothing is attached.

Response

string
The agent ID from the request path.
string
ID of the persona the attached numbers route through. Created on the agent’s first attach and reused afterwards.
string
ID of the pathway compiled from the agent’s version for this binding. Regenerated on every attach.
string
ID of the agent version the binding was compiled from: the newest version on the dev timeline. Versions saved on branches are ignored.
string[]
The numbers that were attached, after trimming.
null | array
null on success, or a list of error objects if the request failed. Returns 404 NOT_FOUND for an unknown agent, 400 NO_VERSIONS when the agent has no saved versions, and 422 COMPILE_FAILED when the newest version cannot be compiled.

Docs for agents: llms.txt