Set or clear one number's agent lines
Replace the spoken lines the conversational agent uses for calls placed from one of your DIDs. instructions is REQUIRED in the body: omitting the key is a 400, not a clear, so a mistyped field name can never silently reset a number. Send null to clear every override and return to the shipped templates.
WHOLE-DOCUMENT REPLACE, NOT A MERGE. What you send is what the number says. To remove one line, re-send the set without it, there is no per-key delete, because a null leaf is refused by the storage constraint.
EVERY REJECTION IS A 400 THAT NAMES THE RULE THAT FIRED, which character, which cap, which shape, never a 200 that stores less than you sent. If any single key or value is refused the whole request is refused, so a number is never left half-configured. That includes a templates or variables that is not an object: it is a 400, not a silently skipped half.
A 200 MEANS STORED, NOT SPOKEN. Read the warnings array on the response and the "when an accepted line is still not spoken" section on SpeechOverrides before concluding from a live call that a line was lost.
Fields this endpoint returns but does not read (using_shipped_templates, connection_status, corridors, normalized, warnings) are IGNORED if you send them back, so a GET-edit-PATCH round trip works. Any other unrecognised field is a 400 that names it.
TWO CORRIDORS, TWO SETS OF KEYS, AND THE corridors ARRAY IS HOW YOU SEE WHICH ONE YOU CONFIGURED. A live-transfer call (briefing_only absent or false) speaks the opening template and reads opening_greeting / opening_preamble. A briefing call (briefing_only true on POST /voice/bridge) speaks briefing_opening and reads briefing_opening_greeting / briefing_opening_preamble. NEITHER KEY EVER STANDS IN FOR THE OTHER: a number with only opening_greeting set speaks your words on live transfers and the shipped introduction on every briefing call, with a 200 and a matching GET either way. The corridors array on GET and on the PATCH response lists EVERY corridor, including the one you set nothing for, and says what each will speak; the PATCH warnings array names, in words, the corridor a key you just sent does NOT affect.
WE DO NOT COPY ONE GREETING INTO THE OTHER FOR YOU, and that is deliberate rather than unfinished: the live-transfer opening is followed by "Are you able to help them right now?" and asks a dealership to take a caller, while the briefing opening is followed by "Have I reached the right person?" and announces a message that will be read out. One sentence cannot be right in both places. Write the second one, or leave the shipped wording there on purpose.
ACCEPTED VALUES MAY STILL BE NORMALIZED, accents are folded to ASCII, runs of whitespace collapse to one space, and an unrecognised {slot} is removed. What is stored is the normalized text, because that is what will actually be spoken; any key whose stored value differs from what you sent is listed in the response under normalized.
from_number must be a Telnyx DID owned by your organization, else 403.
A 400 CAN ALSO MEAN THE DATABASE REFUSED A KEY THIS ENDPOINT ACCEPTED. The allow-list is enforced twice, here and by a storage constraint, and they are deployed separately; when they drift the message names the constraint that fired and the keys you sent, and NOTHING IS WRITTEN. Resending without the most recently added keys works until the pending migration is applied. Requires the voice:bridge scope.
Request
- Base URL: https://corebee.ai/api/v1
- URL: https://corebee.ai/api/v1/voice/bridge/numbers/instructions
- Auth: HTTP bearer
Request body
Example request
{
"from_number": "+17635550123",
"instructions": {
"templates": {
"opening_preamble": "Thanks for taking the call, this is {dealership}",
"state_purpose": "I'm calling on behalf of one of your customers.",
"acknowledge_hold": "Of course, take your time. Here is the note I was given, {prepLine}"
},
"variables": {
"dealership": "Gunn Honda",
"department": "new car sales"
}
}
}Response
Updated
Example response
{
"data": {
"from_number": "+17635550123",
"instructions": {
"templates": {
"opening_preamble": "Thanks for taking the call, this is {dealership}",
"state_purpose": "I'm calling on behalf of one of your customers.",
"acknowledge_hold": "Of course, take your time. Here is the note I was given, {prepLine}"
},
"variables": {
"dealership": "Gunn Honda",
"department": "new car sales"
}
},
"corridors": [
{
"corridor": "briefing",
"template": "briefing_opening",
"greeting_key": "briefing_opening_greeting",
"preamble_key": "briefing_opening_preamble",
"configured_by": [],
"speaks": "shipped_wording"
}
],
"normalized": [
"templates.state_purpose"
],
"warnings": [
{
"path": "templates.state_purpose",
"code": "gate_armed_slot_may_drop_line"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.