v3

latestOpenAPI 3.1.02026-08-0755220214.3 KB
agents

Add Custom Phone Number

Adds a custom phone number to an agent. The user must configure their SIP trunk to point to Phonic's SIP server.

post/agents/{nameOrId}/custom-phone-numbers

Path parameters

nameOrIdstring required

The name or the ID of the agent.

Query parameters

projectstring

The name of the project containing the agent. Only used when nameOrId is a name.

Headers

Authorizationstring required

Bearer authentication header of the form Bearer <PHONIC_API_KEY>. Manage your API keys here.

X-Sip-Addressstring required

SIP address of the user's SIP trunk. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent.

X-Sip-Auth-Usernamestring required

SIP auth username. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent.

X-Sip-Auth-Passwordstring required

SIP auth password. Required. All three SIP headers (X-Sip-Address, X-Sip-Auth-Username, X-Sip-Auth-Password) must be provided. They are used for outbound calls and call transfers from the agent.

Request body

phone_numberstring required

The E.164 formatted phone number to add (e.g., "+15551234567").

Response

Success response

successboolean required