Beyond Retell Binds a number to a version reference for inbound calls, outbound calls, or both. Fields you leave out keep their current value. Send null to remove a binding.
A reference is resolved against the agent picked for each call:
| Reference | Resolves to |
|---|---|
A number, such as "3" |
That version. |
latest |
The newest version, draft or published. |
latest_published |
The newest published version. |
A tag name, such as prod or staging |
The version the tag points at, or the newest published version if the tag points at none. The tag's dynamic variables are applied to the call and its name is stored in the call's metadata.environment_tag. |
The binding only applies when nothing else chose a version:
- Inbound: used when the weighted
inbound_agentsentry has noagent_versionand the inbound webhook did not set one. A reference that fails to resolve is skipped and the call continues on the latest version. - Outbound: used by
POST /v2/create-phone-callwith this number asfrom_numberwhen the request has nooverride_agent_versionand the agent is known (override_agent_idis set, or the number has exactly one outbound agent). A reference that fails to resolve fails the request with400.
The value is not checked when you save it.
Request#
| Path parameter | Type | Required | Description |
|---|---|---|---|
n |
string | Yes | The number in E.164, with + encoded as %2B. |
| Field | Type | Required | Description |
|---|---|---|---|
inbound_version_ref |
string or null | No | Reference for inbound calls. At least one character. null removes it. |
outbound_version_ref |
string or null | No | Reference for outbound calls. At least one character. null removes it. |
Example request#
curl -X PUT https://api.tried.com.au/phone-number-bindings/%2B61255501234 \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "inbound_version_ref": "prod", "outbound_version_ref": "latest_published" }'const n = encodeURIComponent("+61255501234");
const res = await fetch(`https://api.tried.com.au/phone-number-bindings/${n}`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ inbound_version_ref: "prod", outbound_version_ref: "latest_published" }),
});
const binding = await res.json();import os, requests
from urllib.parse import quote
res = requests.put(
f"https://api.tried.com.au/phone-number-bindings/{quote('+61255501234')}",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={"inbound_version_ref": "prod", "outbound_version_ref": "latest_published"},
)
binding = res.json()Response#
200 OK
{
"phone_number": "+61255501234",
"inbound_version_ref": "prod",
"outbound_version_ref": "latest_published"
}Same shape as Get phone number binding.
Errors#
| Status | When |
|---|---|
400 |
Body validation failed, for example inbound_version_ref: String must contain at least 1 character(s). |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the numbers scope. Members get The member role is read-only. |
404 |
Phone number ... not found in this workspace. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.