atteq API
  • Guides
  • Recipes
  • Cookbook
  • API Reference
Information
agents
    List AgentsgetCreate AgentpostDocument AttachmentsgetGet VersiongetEdit DraftpatchReplace Draft GraphputPublish VersionpostGet AgentgetDelete AgentdeleteCopy AgentpostGet DraftgetGet Agent MapgetPending ChangesgetList PlacementsgetRestore VersionpostList VersionsgetGet Mapget
voice_agent
    Open Browser CallpostEnd Browser CalldeleteGet Agent Test LinkgetGet Bridge CeilinggetSet Bridge Ceilingpatch
ai_profiles
    Get Ai Profile CapabilitiesgetList Live SettingsgetCreate Live SettingspostDelete Live SettingsdeleteUpdate Live SettingspatchList Llm SettingsgetCreate Llm SettingspostDelete Llm SettingsdeleteUpdate Llm SettingspatchList ProfilesgetCreate ProfilepostGet ProfilegetDelete ProfiledeleteUpdate ProfilepatchCopy ProfilepostSet Text SectionputSet Voice SectionputList Stt SettingsgetCreate Stt SettingspostDelete Stt SettingsdeleteUpdate Stt SettingspatchList Tts SettingsgetCreate Tts SettingspostDelete Tts SettingsdeleteUpdate Tts SettingspatchList Vad SettingsgetCreate Vad SettingspostDelete Vad SettingsdeleteUpdate Vad Settingspatch
analyst
    List Agent FindingsgetCall Back FindingpostDismiss FindingpostUndo Finding DismissaldeleteTeach FindingpostWatch FindingpostList Question ChartsgetList Tracked QuestionsgetCreate Tracked QuestionpostGet Question Search CostgetSearch For Tracked QuestionpostPropose Tracked QuestionpostDelete Tracked QuestiondeleteUpdate Tracked QuestionpatchGet Reading SwitchgetSet Reading SwitchputGet Agent Summaryget
analytics
    List ChartsgetCreate ChartpostPreview ChartpostGet ChartgetDelete ChartdeleteUpdate ChartpatchRun ChartpostList DatasetsgetList BoardsgetCreate BoardpostGet TraversalgetGet BoardgetDelete BoarddeleteUpdate Boardpatch
authentication
    List InvitationsgetInvite MemberpostRevoke InvitationdeleteResend InvitationpostList MembersgetRemove MemberdeleteGet Member Conversation AccessgetSet Member Conversation AccesspatchSet Member FlagspatchSet Member RolepatchGet OrganizationgetUpdate OrganizationpatchGet Role FlagsgetSet Role Flagspatch
automations
    List AutomationsgetCreate AutomationpostGet AutomationgetDelete AutomationdeleteUpdate AutomationpatchSet Automation EnabledputGet Automation MapgetRun AutomationpostList Automation RunsgetGet Automation Runget
billable-metrics
    List MetricsgetUsage SummarygetGet Metricget
outbound_calls
    Place CallpostList CampaignsgetCreate CampaignpostGet CampaigngetDelete CampaigndeleteUpdate CampaignpatchActivate CampaignpostLink CollectionpostAdd ContactspostAdd Contacts From CollectionpostRemove Contacts From CollectionpostSet Campaign HoursputPreview Campaign HourspostPause CampaignpostGet Campaign SummarygetExclude ContactpostInclude Contactpost
channels
    List ChannelsgetCreate ChannelpostList Thread SubjectsgetClose Channel ThreadpostList Thread DecisionsgetGet Thread Contact FilegetHand Thread To AgentpostList Thread MailgetGet Prepared ReplygetAsk Again For Prepared ReplypostDiscard Prepared ReplypostSend Prepared ReplypostReply On Channel ThreadpostGet ChannelgetDelete ChanneldeleteUpdate ChannelpatchSend On ChannelpostList Channel ThreadsgetList RostergetCreate Roster EntrypostGet Own Roster EntrygetGet Roster EntrygetDelete Roster EntrydeleteUpdate Roster EntrypatchAdd Roster AddresspostChange Roster AddressputRemove Roster Addressdelete
custom-data
    List CollectionsgetCreate CollectionpostList Collection NamesgetGet CollectiongetDelete CollectiondeleteUpdate CollectionpatchAdd FieldpostDelete FielddeleteUpdate FieldpatchImport RecordspostPlan ImportpostPropose ImportpostGet ImportgetList RecordsgetCreate RecordpostBulk Delete RecordspostBulk Set FieldpostCount RecordsgetList Records Of ContactgetDelete Records Of ContactdeleteGet RecordgetDelete RecorddeleteUpdate Recordpatch
connections
    List ConnectionsgetCreate ConnectionpostCreate Forwarded AddresspostCreate Mail ServerpostDiscover Mail ServerpostAuthorize Microsoft MailboxpostList ProvidersgetGet ConnectiongetDelete ConnectiondeleteUpdate ConnectionpatchGet Forwarded AddressgetCheck Forwarded AddresspostList Person GrantsgetSet Person GrantputRemove Person GrantdeleteGet Mail ServergetUpdate Mail ServerpatchList Mail Server FoldersgetEnter Mail Server PasswordputChange Mail Server ServersputTest Mail Server AgainpostGet Microsoft MailboxgetUpdate Microsoft MailboxpatchList Microsoft Mailbox FoldersgetConsent To Microsoft Mailbox WritespostWithdraw Microsoft Mailbox Writesdelete
custom-tools
    List Custom ToolsgetCreate Custom ToolpostGet Custom ToolgetDelete Custom TooldeleteGet Custom Tool DraftgetEdit Custom Tool DraftpatchPublish Custom ToolpostRestore Custom Tool VersionpostTry Custom ToolpostList Custom Tool Versionsget
rag
    List DocumentsgetUpload DocumentpostSearch DocumentspostGet DocumentgetDelete DocumentdeleteDownload DocumentgetReingest Documentpost
flows
    List FlowsgetCreate FlowpostGet FlowgetDelete FlowdeleteRename FlowpatchAdd Flow EdgepostDelete Flow EdgedeleteSet Entry SteppatchAdd SteppostDelete StepdeleteUpdate SteppatchTest FlowpostList Flow Testsget
dynamic_context
    Create GraphpostGet GraphgetDelete GraphdeleteAdd EdgepostDelete EdgedeleteAdd NodepostDelete NodedeleteUpdate NodepatchSet Rootput
inbox
    Get Inbox Open CountgetSet Inbox PreferencespatchGet Inbox RailgetCreate Inbox ViewpostDelete Inbox ViewdeleteUpdate Inbox Viewpatch
handoff
    Assign Threadpost
interactions
    List InteractionsgetCount InteractionsgetGet InteractiongetSet Conversation LabelspostGet TracegetGet TranscriptgetList LabelsgetCreate LabelpostDelete LabeldeleteUpdate Labelpatch
legal
    Agree To Processing AgreementpostAgree To TermspostLegal BoxesgetList Legal DocumentsgetRead Legal DocumentgetList Legal VersionsgetRead Legal VersiongetDownload Legal VersiongetOrganization Legal HistorygetOwn Legal HistorygetObject To SubprocessorspostWithdraw ObjectionpostLegal Pendingget
not-a-tool
    Agree To Processing AgreementpostAgree To TermspostObject To SubprocessorspostWithdraw Objectionpost
memory
    List MemoriesgetList Memory LinesgetCreate Memory LinepostDelete Memory LinedeleteUpdate Memory LinepatchList Memory PeoplegetGet Memory PersongetForget PersondeleteGet Memory SwitchgetSet Memory SwitchputWipe ContactdeleteGet Conversation MemorygetRecall MemoriespostGet MemorygetDelete MemorydeletePatch Memorypatch
notifications
    List InboxgetGet Unread CountgetMark ReadpostMark Unreaddelete
recipes
    List RecipesgetList Installed RecipesgetGet Installed RecipegetUninstall RecipedeleteSet Recipe EnabledputUpdate Recipe ParameterspatchUpdate RecipepostInstall Recipepost
data-retention
    Get RetentiongetSet Retentionpatch
text
    Open ConversationpostClose ConversationpostAnswer ConfirmationpostGet Sent FilegetSend MessagepostSet Modepatch
tools
    List ToolsgetCreate ToolpostList BuiltinsgetImport Mcp ServerpostImport OpenapipostPreview Openapi ImportpostSuggest Tool ExamplespostGet ToolgetDelete TooldeleteUpdate ToolpatchTest ToolpostList Tool Testsget
trunks
    List Transfer DirectorygetCreate Transfer Directory EntrypostGet Transfer Directory EntrygetDelete Transfer Directory EntrydeleteUpdate Transfer Directory EntrypatchList TrunksgetCreate TrunkpostGet TrunkgetDelete TrunkdeleteUpdate TrunkpatchList Forward Recordsget
Schemas
powered by Zudoku
attek API
attek API

trunks


List Transfer Directory

GET
/api/v1/transfer-directory

List the organization's transfer directory: the named people, queues and numbers its agents may transfer a call to, each with its target, hours, note, whether it is closed now and whether it reaches nothing (its trunk was deleted).

List Transfer Directory › Responses

200

Successful Response

​DirectoryEntryOut[]
An entry of the transfer directory, as whoever may set up a transfer tool reads it (rule 60). `reaches_nothing` is an extension or address entry whose trunk is gone (rule 61), or no longer a phone system with an address to send calls to: it is kept, and never shown to an agent. `closed` is the entry outside its hours now, read in the organization's timezone (rule 58); a closed entry is still transferable.
DirectoryEntryOut
closed
​boolean · readOnly · required
created_at
​string · date-time · required
​required
id
​string · uuid · required
kind
​DirectoryTargetKind · enum · required

What a directory entry reaches (rule 55): a phone number, normalised to E.164 like every number; or an extension, or an address the client's phone system gives a person, a queue or a group -- both held as text exactly as the system names them (rule 56) and reached only through the entry's trunk.

Enum values:
number
extension
address
name
​string · required
​required
​required
reaches_nothing
​boolean · readOnly · required
ring_even_if_diverted
​boolean · required
target
​string · required
updated_at
​string · date-time · required
GET/api/v1/transfer-directory
curl /api/v1/transfer-directory \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "closed": true, "created_at": "2024-08-25T15:00:00Z", "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "id": "00000000-0000-0000-0000-000000000000", "kind": "number", "name": "name", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "reaches_nothing": true, "ring_even_if_diverted": true, "target": "target", "updated_at": "2024-08-25T15:00:00Z" } ]
json
application/json

Create Transfer Directory Entry

POST
/api/v1/transfer-directory

Add a named destination to the transfer directory: a phone number, or an extension or address of your phone system with the trunk it is reached through. Owner or admin. A name already used, or a number that receives calls on the platform, is refused.

Create Transfer Directory Entry › Request Body

A new entry of the transfer directory (rules 55-57). `target` is read as `kind` says: a number is normalised against the organization's default country when it carries none, an extension or an address is kept exactly as written. `peer_id` is the trunk -- `TrunkPeerOut.id`, the phone system's -- an extension or an address is reached through, and a number entry names none.
DirectoryEntryIn
kind
​DirectoryTargetKind · enum · required

What a directory entry reaches (rule 55): a phone number, normalised to E.164 like every number; or an extension, or an address the client's phone system gives a person, a queue or a group -- both held as text exactly as the system names them (rule 56) and reached only through the entry's trunk.

Enum values:
number
extension
address
name
​string · minLength: 1 · maxLength: 80 · required
target
​string · required
​
​
​
ring_even_if_diverted
​boolean
Default: false

Create Transfer Directory Entry › Responses

Successful Response

An entry of the transfer directory, as whoever may set up a transfer tool reads it (rule 60). `reaches_nothing` is an extension or address entry whose trunk is gone (rule 61), or no longer a phone system with an address to send calls to: it is kept, and never shown to an agent. `closed` is the entry outside its hours now, read in the organization's timezone (rule 58); a closed entry is still transferable.
DirectoryEntryOut
closed
​boolean · readOnly · required
created_at
​string · date-time · required
​required
id
​string · uuid · required
kind
​DirectoryTargetKind · enum · required

What a directory entry reaches (rule 55): a phone number, normalised to E.164 like every number; or an extension, or an address the client's phone system gives a person, a queue or a group -- both held as text exactly as the system names them (rule 56) and reached only through the entry's trunk.

Enum values:
number
extension
address
name
​string · required
​required
​required
reaches_nothing
​boolean · readOnly · required
ring_even_if_diverted
​boolean · required
target
​string · required
updated_at
​string · date-time · required
POST/api/v1/transfer-directory
curl /api/v1/transfer-directory \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "kind": "number", "name": "name", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "ring_even_if_diverted": false, "target": "target" }'
Example Request Body
{ "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "kind": "number", "name": "name", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "ring_even_if_diverted": false, "target": "target" }
json
Example Responses
{ "closed": true, "created_at": "2024-08-25T15:00:00Z", "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "id": "00000000-0000-0000-0000-000000000000", "kind": "number", "name": "name", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "reaches_nothing": true, "ring_even_if_diverted": true, "target": "target", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Get Transfer Directory Entry

GET
/api/v1/transfer-directory/{entry_id}

Read one transfer directory entry.

Get Transfer Directory Entry › path Parameters

entry_id
​string · uuid · required

Get Transfer Directory Entry › Responses

Successful Response

An entry of the transfer directory, as whoever may set up a transfer tool reads it (rule 60). `reaches_nothing` is an extension or address entry whose trunk is gone (rule 61), or no longer a phone system with an address to send calls to: it is kept, and never shown to an agent. `closed` is the entry outside its hours now, read in the organization's timezone (rule 58); a closed entry is still transferable.
DirectoryEntryOut
closed
​boolean · readOnly · required
created_at
​string · date-time · required
​required
id
​string · uuid · required
kind
​DirectoryTargetKind · enum · required

What a directory entry reaches (rule 55): a phone number, normalised to E.164 like every number; or an extension, or an address the client's phone system gives a person, a queue or a group -- both held as text exactly as the system names them (rule 56) and reached only through the entry's trunk.

Enum values:
number
extension
address
name
​string · required
​required
​required
reaches_nothing
​boolean · readOnly · required
ring_even_if_diverted
​boolean · required
target
​string · required
updated_at
​string · date-time · required
GET/api/v1/transfer-directory/{entry_id}
curl /api/v1/transfer-directory/:entry_id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "closed": true, "created_at": "2024-08-25T15:00:00Z", "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "id": "00000000-0000-0000-0000-000000000000", "kind": "number", "name": "name", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "reaches_nothing": true, "ring_even_if_diverted": true, "target": "target", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Delete Transfer Directory Entry

DELETE
/api/v1/transfer-directory/{entry_id}

Remove an entry from the transfer directory. Owner or admin.

Delete Transfer Directory Entry › path Parameters

entry_id
​string · uuid · required

Delete Transfer Directory Entry › Responses

Successful Response

No data returned
DELETE/api/v1/transfer-directory/{entry_id}
curl /api/v1/transfer-directory/:entry_id \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

Update Transfer Directory Entry

PATCH
/api/v1/transfer-directory/{entry_id}

Change a transfer directory entry: its name, target, trunk, hours, note or whether it rings even if the call was diverted from it. Owner or admin.

Update Transfer Directory Entry › path Parameters

entry_id
​string · uuid · required

Update Transfer Directory Entry › Request Body

A partial edit of an entry: only the fields sent change. `null` clears `hours`, `note` and `peer_id`; `name`, `kind` and `target` cannot be cleared. Every check `DirectoryEntryIn` meets is made against the entry the edit would produce.
DirectoryEntryUpdate
​
​
​
​
​
​
​

Update Transfer Directory Entry › Responses

Successful Response

An entry of the transfer directory, as whoever may set up a transfer tool reads it (rule 60). `reaches_nothing` is an extension or address entry whose trunk is gone (rule 61), or no longer a phone system with an address to send calls to: it is kept, and never shown to an agent. `closed` is the entry outside its hours now, read in the organization's timezone (rule 58); a closed entry is still transferable.
DirectoryEntryOut
closed
​boolean · readOnly · required
created_at
​string · date-time · required
​required
id
​string · uuid · required
kind
​DirectoryTargetKind · enum · required

What a directory entry reaches (rule 55): a phone number, normalised to E.164 like every number; or an extension, or an address the client's phone system gives a person, a queue or a group -- both held as text exactly as the system names them (rule 56) and reached only through the entry's trunk.

Enum values:
number
extension
address
name
​string · required
​required
​required
reaches_nothing
​boolean · readOnly · required
ring_even_if_diverted
​boolean · required
target
​string · required
updated_at
​string · date-time · required
PATCH/api/v1/transfer-directory/{entry_id}
curl /api/v1/transfer-directory/:entry_id \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "kind": "number", "name": "string", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "ring_even_if_diverted": true, "target": "string" }'
Example Request Body
{ "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "kind": "number", "name": "string", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "ring_even_if_diverted": true, "target": "string" }
json
Example Responses
{ "closed": true, "created_at": "2024-08-25T15:00:00Z", "hours": [ { "ends_at": "15:00:00", "starts_at": "15:00:00", "weekday": 0 } ], "id": "00000000-0000-0000-0000-000000000000", "kind": "number", "name": "name", "note": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "reaches_nothing": true, "ring_even_if_diverted": true, "target": "target", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

List Trunks

GET
/api/v1/trunks

List this organization's phone lines, optionally only inbound or outbound: each one's number or extension, the agent it routes to, its trunk (peer: the connection's settings, the peer recognised, what the peer must be told of us), fallback number and whether the phone network can reach it (reachability). Passwords are never included.

List Trunks › query Parameters

direction
​

List Trunks › Responses

Successful Response

​TrunkOut[]
One line, with its trunk's settings beside it -- the shape a "trunk" was read in before trunks had lines, and the one every caller of `get_trunk`/`list_trunks` still reads (`TrunkPeerOut` docstring). `id` is the line's; `peer` is the trunk it is on, and is what a reader who knows about lines reads the trunk from.
TrunkOut
​required
allowed_ips
​string[] · required
carrier_failover_possible
​boolean · readOnly · required

The per-kind guarantee, stated rather than left for the client to infer from kind (rules 21-22): true only for a number the platform provides; a line on a trunk of the client's own gets our routing's forward only.

created_at
​string · date-time · required
direction
​backend__features__trunks__schemas__Direction · enum · required

Which way calls flow over the trunk.

Enum values:
inbound
outbound
fallback_condition
​FallbackCondition · enum · required

Whether the trunk is currently forwarding calls to its fallback number.

Binary on purpose: "A trunk can sit in fallback indefinitely... entering fallback raises a notification... and again when the condition clears" — the spec only ever names two states, not a severity scale.

Enum values:
normal
fallback
​required
​required
​required
id
​string · uuid · required
kind
​Kind · enum · required

Which peer a trunk connects to (trunks.md rule 4).

Enum values:
byo_sip
pbx
platform
name
​string · required
number
​string · required
​required
​required
​required
​required
updated_at
​string · date-time · required
answer_bound_seconds
​integer · readOnly
Default: 10
​
carrier
​string · readOnly

Which carrier this line's calls cross: for a placing line, the carrier its trunk's SIP host is; for a receiving line, the host or else the addresses it accepts calls from; for a platform trunk, the deployment's own connection. telnyx, netelip, or unknown. Read-only; there is no setting for it.

Default: unknown
fallback_answered_by_platform
​boolean · readOnly
Default: false
line_type
​LineType · enum

What a line's number is (trunks.md rule 7): a phone number, normalised to E.164, or an extension of the client's phone system, held as text exactly as the system names it and never read as a number.

Enum values:
number
extension
Default: number
​
reachability
​Reachability · enum

Whether the phone network can reach this line's trunk: incomplete (it lacks what its peer authenticates by), unreachable (the last run found no carrier-side object), reachable (a run within the last five minutes found it), or unknown (never reconciled, or not recently -- which is not health).

Enum values:
reachable
unreachable
unknown
incomplete
Default: unknown
​
​
​deprecated

Deprecated: always null, kept for one release.

fallback_wait_seconds
​integer · deprecated

Deprecated: answer_bound_seconds, kept for one release.

reachable
​boolean · deprecated

Deprecated: reachability == "reachable", kept for one release. False for an unknown trunk as well as an unreachable one; read reachability.

Default: false
GET/api/v1/trunks
curl /api/v1/trunks \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [ "string" ], "answer_bound_seconds": 10, "auth_username": "string", "carrier": "unknown", "carrier_failover_possible": true, "carrier_wait_seconds": 0, "created_at": "2024-08-25T15:00:00Z", "direction": "inbound", "fallback_answered_by_platform": false, "fallback_condition": "normal", "fallback_number": "string", "fallback_reason": "string", "fallback_tested_at": "2024-08-25T15:00:00Z", "fallback_wait_seconds": 0, "id": "00000000-0000-0000-0000-000000000000", "kind": "byo_sip", "line_type": "number", "name": "name", "number": "number", "peer": { "allowed_ips": [], "announced": "string", "announced_at": "2024-08-25T15:00:00Z", "auth_username": "string", "carries_directory": false, "hands_over_inbound": false, "hands_over_outbound": false, "id": "00000000-0000-0000-0000-000000000000", "inbound_auth_username": "string", "kind": "byo_sip", "name": "name", "our_side": { "sip_address": "string", "source_addresses": [], "transports": [] }, "places": false, "reachability": "unknown", "receives": false, "recognised_as": "unknown", "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "source_addresses": [], "transport": "string", "unreachable_since": "2024-08-25T15:00:00Z" }, "provider_dispatch_id": "string", "provider_number_id": "string", "provider_trunk_id": "string", "reachability": "unknown", "reachable": false, "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "unreachable_since": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" } ]
json
application/json

Create Trunk

POST
/api/v1/trunks

Add a line -- a phone number or an extension -- on a new trunk, or on one of this organization's trunks (peer_id). Use when a number has to exist on the platform for the first time: an inbound line, pointed at the agent that answers it, or an outbound one, which binds no agent — each call and campaign names its own. A number is stored in E.164 and an extension as written; a number that already receives calls on the platform is refused as taken, and so is an extension on a trunk whose addresses another trunk shares. The answer shows what the peer must be told of us (peer.our_side).

Create Trunk › Request Body

A new line -- on a new trunk, or on one of the organization's trunks already there (`peer_id`, trunks.md rule 1). **On a new trunk**, `kind` is required and the trunk's settings come from this body: the side its peer calls from (`allowed_ips`), the side we call it on (`sip_address`, and `transport` for a phone system only -- a carrier's is the carrier's, rule 8), and a credential. **On an existing trunk**, `kind` may be omitted and must match when given; any trunk setting the body carries edits the trunk, exactly as `TrunkUpdate` would. The credentials are per side (rule 5, #2214): `inbound_auth_*` is what the peer authenticates with on the calls it sends us, `outbound_auth_*` what we authenticate as on the calls we send it -- whichever way the line runs, so a phone system whose lines only receive can still be given the credential our calls back to it carry. `auth_username`/`auth_password` are the older spelling, the side this line's direction uses, kept one release for the screen that still sends them (`DECISIONS.md` 2026-10-28). **Passwords are write-only**: never on `TrunkOut`, sealed at rest (ADR 0050).
TrunkIn
direction
​backend__features__trunks__schemas__Direction · enum · required

Which way calls flow over the trunk.

Enum values:
inbound
outbound
name
​string · required
number
​string · required
​
allowed_ips
​string[]
Default: []
​
​
​
​
line_type
​LineType · enum

What a line's number is (trunks.md rule 7): a phone number, normalised to E.164, or an extension of the client's phone system, held as text exactly as the system names it and never read as a number.

Enum values:
number
extension
Default: number
​
​
​
​
​
​
​
​deprecated
​deprecated

Create Trunk › Responses

Successful Response

One line, with its trunk's settings beside it -- the shape a "trunk" was read in before trunks had lines, and the one every caller of `get_trunk`/`list_trunks` still reads (`TrunkPeerOut` docstring). `id` is the line's; `peer` is the trunk it is on, and is what a reader who knows about lines reads the trunk from.
TrunkOut
​required
allowed_ips
​string[] · required
carrier_failover_possible
​boolean · readOnly · required

The per-kind guarantee, stated rather than left for the client to infer from kind (rules 21-22): true only for a number the platform provides; a line on a trunk of the client's own gets our routing's forward only.

created_at
​string · date-time · required
direction
​backend__features__trunks__schemas__Direction · enum · required

Which way calls flow over the trunk.

Enum values:
inbound
outbound
fallback_condition
​FallbackCondition · enum · required

Whether the trunk is currently forwarding calls to its fallback number.

Binary on purpose: "A trunk can sit in fallback indefinitely... entering fallback raises a notification... and again when the condition clears" — the spec only ever names two states, not a severity scale.

Enum values:
normal
fallback
​required
​required
​required
id
​string · uuid · required
kind
​Kind · enum · required

Which peer a trunk connects to (trunks.md rule 4).

Enum values:
byo_sip
pbx
platform
name
​string · required
number
​string · required
​required
​required
​required
​required
updated_at
​string · date-time · required
answer_bound_seconds
​integer · readOnly
Default: 10
​
carrier
​string · readOnly

Which carrier this line's calls cross: for a placing line, the carrier its trunk's SIP host is; for a receiving line, the host or else the addresses it accepts calls from; for a platform trunk, the deployment's own connection. telnyx, netelip, or unknown. Read-only; there is no setting for it.

Default: unknown
fallback_answered_by_platform
​boolean · readOnly
Default: false
line_type
​LineType · enum

What a line's number is (trunks.md rule 7): a phone number, normalised to E.164, or an extension of the client's phone system, held as text exactly as the system names it and never read as a number.

Enum values:
number
extension
Default: number
​
reachability
​Reachability · enum

Whether the phone network can reach this line's trunk: incomplete (it lacks what its peer authenticates by), unreachable (the last run found no carrier-side object), reachable (a run within the last five minutes found it), or unknown (never reconciled, or not recently -- which is not health).

Enum values:
reachable
unreachable
unknown
incomplete
Default: unknown
​
​
​deprecated

Deprecated: always null, kept for one release.

fallback_wait_seconds
​integer · deprecated

Deprecated: answer_bound_seconds, kept for one release.

reachable
​boolean · deprecated

Deprecated: reachability == "reachable", kept for one release. False for an unknown trunk as well as an unreachable one; read reachability.

Default: false
POST/api/v1/trunks
curl /api/v1/trunks \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [], "auth_password": "string", "auth_username": "string", "direction": "inbound", "fallback_number": "string", "inbound_auth_password": "string", "inbound_auth_username": "string", "kind": "byo_sip", "line_type": "number", "name": "name", "number": "number", "outbound_auth_password": "string", "outbound_auth_username": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "peer_name": "string", "provider_trunk_id": "string", "sip_address": "string", "transport": "string" }'
Example Request Body
{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [], "auth_password": "string", "auth_username": "string", "direction": "inbound", "fallback_number": "string", "inbound_auth_password": "string", "inbound_auth_username": "string", "kind": "byo_sip", "line_type": "number", "name": "name", "number": "number", "outbound_auth_password": "string", "outbound_auth_username": "string", "peer_id": "00000000-0000-0000-0000-000000000000", "peer_name": "string", "provider_trunk_id": "string", "sip_address": "string", "transport": "string" }
json
Example Responses
{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [ "string" ], "answer_bound_seconds": 10, "auth_username": "string", "carrier": "unknown", "carrier_failover_possible": true, "carrier_wait_seconds": 0, "created_at": "2024-08-25T15:00:00Z", "direction": "inbound", "fallback_answered_by_platform": false, "fallback_condition": "normal", "fallback_number": "string", "fallback_reason": "string", "fallback_tested_at": "2024-08-25T15:00:00Z", "fallback_wait_seconds": 0, "id": "00000000-0000-0000-0000-000000000000", "kind": "byo_sip", "line_type": "number", "name": "name", "number": "number", "peer": { "allowed_ips": [], "announced": "string", "announced_at": "2024-08-25T15:00:00Z", "auth_username": "string", "carries_directory": false, "hands_over_inbound": false, "hands_over_outbound": false, "id": "00000000-0000-0000-0000-000000000000", "inbound_auth_username": "string", "kind": "byo_sip", "name": "name", "our_side": { "sip_address": "string", "source_addresses": [], "transports": [] }, "places": false, "reachability": "unknown", "receives": false, "recognised_as": "unknown", "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "source_addresses": [], "transport": "string", "unreachable_since": "2024-08-25T15:00:00Z" }, "provider_dispatch_id": "string", "provider_number_id": "string", "provider_trunk_id": "string", "reachability": "unknown", "reachable": false, "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "unreachable_since": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Get Trunk

GET
/api/v1/trunks/{trunk_id}

Read one line: its number or extension and direction, the agent it routes to, its trunk (peer), fallback number and conditions, and whether the phone network can reach it (reachability). Passwords are never included.

Get Trunk › path Parameters

trunk_id
​string · uuid · required

Get Trunk › Responses

Successful Response

One line, with its trunk's settings beside it -- the shape a "trunk" was read in before trunks had lines, and the one every caller of `get_trunk`/`list_trunks` still reads (`TrunkPeerOut` docstring). `id` is the line's; `peer` is the trunk it is on, and is what a reader who knows about lines reads the trunk from.
TrunkOut
​required
allowed_ips
​string[] · required
carrier_failover_possible
​boolean · readOnly · required

The per-kind guarantee, stated rather than left for the client to infer from kind (rules 21-22): true only for a number the platform provides; a line on a trunk of the client's own gets our routing's forward only.

created_at
​string · date-time · required
direction
​backend__features__trunks__schemas__Direction · enum · required

Which way calls flow over the trunk.

Enum values:
inbound
outbound
fallback_condition
​FallbackCondition · enum · required

Whether the trunk is currently forwarding calls to its fallback number.

Binary on purpose: "A trunk can sit in fallback indefinitely... entering fallback raises a notification... and again when the condition clears" — the spec only ever names two states, not a severity scale.

Enum values:
normal
fallback
​required
​required
​required
id
​string · uuid · required
kind
​Kind · enum · required

Which peer a trunk connects to (trunks.md rule 4).

Enum values:
byo_sip
pbx
platform
name
​string · required
number
​string · required
​required
​required
​required
​required
updated_at
​string · date-time · required
answer_bound_seconds
​integer · readOnly
Default: 10
​
carrier
​string · readOnly

Which carrier this line's calls cross: for a placing line, the carrier its trunk's SIP host is; for a receiving line, the host or else the addresses it accepts calls from; for a platform trunk, the deployment's own connection. telnyx, netelip, or unknown. Read-only; there is no setting for it.

Default: unknown
fallback_answered_by_platform
​boolean · readOnly
Default: false
line_type
​LineType · enum

What a line's number is (trunks.md rule 7): a phone number, normalised to E.164, or an extension of the client's phone system, held as text exactly as the system names it and never read as a number.

Enum values:
number
extension
Default: number
​
reachability
​Reachability · enum

Whether the phone network can reach this line's trunk: incomplete (it lacks what its peer authenticates by), unreachable (the last run found no carrier-side object), reachable (a run within the last five minutes found it), or unknown (never reconciled, or not recently -- which is not health).

Enum values:
reachable
unreachable
unknown
incomplete
Default: unknown
​
​
​deprecated

Deprecated: always null, kept for one release.

fallback_wait_seconds
​integer · deprecated

Deprecated: answer_bound_seconds, kept for one release.

reachable
​boolean · deprecated

Deprecated: reachability == "reachable", kept for one release. False for an unknown trunk as well as an unreachable one; read reachability.

Default: false
GET/api/v1/trunks/{trunk_id}
curl /api/v1/trunks/:trunk_id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [ "string" ], "answer_bound_seconds": 10, "auth_username": "string", "carrier": "unknown", "carrier_failover_possible": true, "carrier_wait_seconds": 0, "created_at": "2024-08-25T15:00:00Z", "direction": "inbound", "fallback_answered_by_platform": false, "fallback_condition": "normal", "fallback_number": "string", "fallback_reason": "string", "fallback_tested_at": "2024-08-25T15:00:00Z", "fallback_wait_seconds": 0, "id": "00000000-0000-0000-0000-000000000000", "kind": "byo_sip", "line_type": "number", "name": "name", "number": "number", "peer": { "allowed_ips": [], "announced": "string", "announced_at": "2024-08-25T15:00:00Z", "auth_username": "string", "carries_directory": false, "hands_over_inbound": false, "hands_over_outbound": false, "id": "00000000-0000-0000-0000-000000000000", "inbound_auth_username": "string", "kind": "byo_sip", "name": "name", "our_side": { "sip_address": "string", "source_addresses": [], "transports": [] }, "places": false, "reachability": "unknown", "receives": false, "recognised_as": "unknown", "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "source_addresses": [], "transport": "string", "unreachable_since": "2024-08-25T15:00:00Z" }, "provider_dispatch_id": "string", "provider_number_id": "string", "provider_trunk_id": "string", "reachability": "unknown", "reachable": false, "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "unreachable_since": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Delete Trunk

DELETE
/api/v1/trunks/{trunk_id}

Delete a line permanently, and its trunk with it when it was the last. Use when a number should stop reaching any agent; the reconciler reaps the carrier-side objects nothing claims any more.

Delete Trunk › path Parameters

trunk_id
​string · uuid · required

Delete Trunk › Responses

Successful Response

No data returned
DELETE/api/v1/trunks/{trunk_id}
curl /api/v1/trunks/:trunk_id \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

Update Trunk

PATCH
/api/v1/trunks/{trunk_id}

Change a line's number, name, or which agent answers it, and its trunk's settings, which every line on that trunk shares. Use when re-pointing an existing inbound number at a different agent, renaming it, or setting or clearing its fallback; an agent and a fallback number belong to an inbound line only, and one of the platform's own agents is refused.

Update Trunk › path Parameters

trunk_id
​string · uuid · required

Update Trunk › Request Body

Partial edit of a line and its trunk -- only provided fields change (`model_dump(exclude_unset=True)`). The line's own fields are `name`, `number`, `line_type`, `direction`, `agent_id` and `fallback_number`; `peer_name`, `kind`, `sip_address`, `transport`, `allowed_ips`, the credentials and `provider_trunk_id` are the trunk's, so an edit to them is seen by every line on it. The credentials are per side, as on `TrunkIn`; the older `auth_*` pair and `provider_trunk_id` are the side this line's direction uses. `fallback_number` may be set to `null` deliberately: that clears it, and a cleared fallback is a legal, visible state (rule 24), not an omission. Whether the result still makes sense against `direction` — old or new — is a service-layer check: the two fields can arrive in different requests, so no single schema ever sees both values at once. The same holds for `number` against `line_type`, which `service.update_trunk` reads against the line it would produce.
TrunkUpdate
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​deprecated
​deprecated

Update Trunk › Responses

Successful Response

One line, with its trunk's settings beside it -- the shape a "trunk" was read in before trunks had lines, and the one every caller of `get_trunk`/`list_trunks` still reads (`TrunkPeerOut` docstring). `id` is the line's; `peer` is the trunk it is on, and is what a reader who knows about lines reads the trunk from.
TrunkOut
​required
allowed_ips
​string[] · required
carrier_failover_possible
​boolean · readOnly · required

The per-kind guarantee, stated rather than left for the client to infer from kind (rules 21-22): true only for a number the platform provides; a line on a trunk of the client's own gets our routing's forward only.

created_at
​string · date-time · required
direction
​backend__features__trunks__schemas__Direction · enum · required

Which way calls flow over the trunk.

Enum values:
inbound
outbound
fallback_condition
​FallbackCondition · enum · required

Whether the trunk is currently forwarding calls to its fallback number.

Binary on purpose: "A trunk can sit in fallback indefinitely... entering fallback raises a notification... and again when the condition clears" — the spec only ever names two states, not a severity scale.

Enum values:
normal
fallback
​required
​required
​required
id
​string · uuid · required
kind
​Kind · enum · required

Which peer a trunk connects to (trunks.md rule 4).

Enum values:
byo_sip
pbx
platform
name
​string · required
number
​string · required
​required
​required
​required
​required
updated_at
​string · date-time · required
answer_bound_seconds
​integer · readOnly
Default: 10
​
carrier
​string · readOnly

Which carrier this line's calls cross: for a placing line, the carrier its trunk's SIP host is; for a receiving line, the host or else the addresses it accepts calls from; for a platform trunk, the deployment's own connection. telnyx, netelip, or unknown. Read-only; there is no setting for it.

Default: unknown
fallback_answered_by_platform
​boolean · readOnly
Default: false
line_type
​LineType · enum

What a line's number is (trunks.md rule 7): a phone number, normalised to E.164, or an extension of the client's phone system, held as text exactly as the system names it and never read as a number.

Enum values:
number
extension
Default: number
​
reachability
​Reachability · enum

Whether the phone network can reach this line's trunk: incomplete (it lacks what its peer authenticates by), unreachable (the last run found no carrier-side object), reachable (a run within the last five minutes found it), or unknown (never reconciled, or not recently -- which is not health).

Enum values:
reachable
unreachable
unknown
incomplete
Default: unknown
​
​
​deprecated

Deprecated: always null, kept for one release.

fallback_wait_seconds
​integer · deprecated

Deprecated: answer_bound_seconds, kept for one release.

reachable
​boolean · deprecated

Deprecated: reachability == "reachable", kept for one release. False for an unknown trunk as well as an unreachable one; read reachability.

Default: false
PATCH/api/v1/trunks/{trunk_id}
curl /api/v1/trunks/:trunk_id \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [ "string" ], "auth_password": "string", "auth_username": "string", "direction": "inbound", "fallback_number": "string", "inbound_auth_password": "string", "inbound_auth_username": "string", "kind": "byo_sip", "line_type": "number", "name": "string", "number": "string", "outbound_auth_password": "string", "outbound_auth_username": "string", "peer_name": "string", "provider_trunk_id": "string", "sip_address": "string", "transport": "string" }'
Example Request Body
{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [ "string" ], "auth_password": "string", "auth_username": "string", "direction": "inbound", "fallback_number": "string", "inbound_auth_password": "string", "inbound_auth_username": "string", "kind": "byo_sip", "line_type": "number", "name": "string", "number": "string", "outbound_auth_password": "string", "outbound_auth_username": "string", "peer_name": "string", "provider_trunk_id": "string", "sip_address": "string", "transport": "string" }
json
Example Responses
{ "agent_id": "00000000-0000-0000-0000-000000000000", "allowed_ips": [ "string" ], "answer_bound_seconds": 10, "auth_username": "string", "carrier": "unknown", "carrier_failover_possible": true, "carrier_wait_seconds": 0, "created_at": "2024-08-25T15:00:00Z", "direction": "inbound", "fallback_answered_by_platform": false, "fallback_condition": "normal", "fallback_number": "string", "fallback_reason": "string", "fallback_tested_at": "2024-08-25T15:00:00Z", "fallback_wait_seconds": 0, "id": "00000000-0000-0000-0000-000000000000", "kind": "byo_sip", "line_type": "number", "name": "name", "number": "number", "peer": { "allowed_ips": [], "announced": "string", "announced_at": "2024-08-25T15:00:00Z", "auth_username": "string", "carries_directory": false, "hands_over_inbound": false, "hands_over_outbound": false, "id": "00000000-0000-0000-0000-000000000000", "inbound_auth_username": "string", "kind": "byo_sip", "name": "name", "our_side": { "sip_address": "string", "source_addresses": [], "transports": [] }, "places": false, "reachability": "unknown", "receives": false, "recognised_as": "unknown", "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "source_addresses": [], "transport": "string", "unreachable_since": "2024-08-25T15:00:00Z" }, "provider_dispatch_id": "string", "provider_number_id": "string", "provider_trunk_id": "string", "reachability": "unknown", "reachable": false, "reconciled_at": "2024-08-25T15:00:00Z", "sip_address": "string", "unreachable_since": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

List Forward Records

GET
/api/v1/trunks/{trunk_id}/forwards

List the calls this line forwarded on, newest first. Use when checking a line's forwarding history.

List Forward Records › path Parameters

trunk_id
​string · uuid · required

List Forward Records › Responses

Successful Response

​ForwardRecordOut[]
One forwarded call, as its line remembers it — "when, why, and where it went." Deliberately not an interaction (docs/features/interactions.md: "A call that never reached an agent is not an interaction"). `outcome` is `UNSERVED` for a call that went nowhere. `trunk_id` is the **line's** id, the id a line has had since it was a trunk of its own.
ForwardRecordOut
​required
created_at
​string · date-time · required
​required
id
​string · uuid · required
origin
​ForwardOrigin · enum · required

Which of the two places forwarded a given call — "Two guarantees, and they are not the same size" (docs/features/trunks.md). Kept apart because they carry different evidentiary weight: one is first-hand, the other is hearsay we may never receive.

Enum values:
our_routing
carrier_edge
reason
​string · required
trunk_id
​string · uuid · required
outcome
​ForwardOutcome · enum

What became of a call the trunk could not put through to its agent. A trunk with a fallback number FORWARDED it there; one with none left it UNSERVED -- it reached nobody (trunks.md rule 34, #361). Its own column and not an inference from forwarded_to IS NULL, which a carrier-edge record may also carry.

Enum values:
forwarded
unserved
Default: forwarded
GET/api/v1/trunks/{trunk_id}/forwards
curl /api/v1/trunks/:trunk_id/forwards \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "caller_number": "string", "created_at": "2024-08-25T15:00:00Z", "forwarded_to": "string", "id": "00000000-0000-0000-0000-000000000000", "origin": "our_routing", "outcome": "forwarded", "reason": "reason", "trunk_id": "00000000-0000-0000-0000-000000000000" } ]
json
application/json

tools