Skip to main content

Phone Numbers

Tags: communication, phone, sms

Phone number and SMS management

In the product: Phone & Voice

Resources

Request and response models used by the endpoints on this page.

ArchiveBlockersResponse

FieldTypeRequiredDescription
canArchiveBoolean
workflowBlockersArray

Example:

{
"canArchive": false // Boolean,
"workflowBlockers": [] // Array<WorkflowBlockerResponse>
}

PhoneNumberResponse

FieldTypeRequiredDescription
a2pStatusString
allowAnonymousBoolean
allowSignupBoolean
anonymousMemberRoleIdInteger
anonymousRejectionMessageString
assistantEnabledBoolean
brandDescriptionString
brandNameString
brandWebsiteString
createdAtDateTime
defaultWorkflowIdInteger
enableSmsBoolean
enableVoiceBoolean
enableWhatsAppBoolean
idInteger
inboundCallHandlingString
isArchivedBoolean
isMappedBoolean
nameString
numberString
operatorGroupIdInteger
operatorNoAnswerActionString
operatorNoAnswerMessageString
operatorRingTimeoutSecondsInteger
providerPhoneUuidString
restartDelayInteger
restartPromptString
signupMemberRoleIdInteger
smsForwardNumberString
smsOffHoursMessageString
smsUnavailableMessageString
smsWorkModeString
twilioInboundReadyBoolean
twilioNumberSidString
updatedAtDateTime
uuidString
voiceForwardNumberString
voiceGreetingMessageString
voiceOffHoursMessageString
voiceRequireConsentBooleanDefault: False
voiceUnavailableMessageString
voicemailGreetingString
webhookWarningString

Example:

{
"id": 0 // Integer,
"uuid": "string" // String,
"number": "string" // String,
"name": "string" // String,
"brandName": "string" // String,
"brandDescription": "string" // String,
"brandWebsite": "string" // String,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"allowSignup": false // Boolean,
"allowAnonymous": false // Boolean,
"signupMemberRoleId": 0 // Integer, optional,
"anonymousMemberRoleId": 0 // Integer, optional,
"defaultWorkflowId": 0 // Integer, optional,
"restartPrompt": "string" // String, optional,
"restartDelay": 0 // Integer, optional,
"enableSms": false // Boolean,
"enableVoice": false // Boolean,
"enableWhatsApp": false // Boolean,
"voiceUnavailableMessage": "string" // String, optional,
"voiceGreetingMessage": "string" // String, optional,
"voiceRequireConsent": false // Boolean, optional, default: False,
"assistantEnabled": false // Boolean,
"smsWorkMode": "string" // String, optional,
"smsOffHoursMessage": "string" // String, optional,
"smsForwardNumber": "string" // String, optional,
"smsUnavailableMessage": "string" // String, optional,
"inboundCallHandling": "string" // String,
"voiceOffHoursMessage": "string" // String, optional,
"voiceForwardNumber": "string" // String, optional,
"anonymousRejectionMessage": "string" // String, optional,
"voicemailGreeting": "string" // String, optional,
"isArchived": false // Boolean,
"isMapped": false // Boolean,
"twilioInboundReady": false // Boolean,
"providerPhoneUuid": "string" // String, optional,
"operatorGroupId": 0 // Integer, optional,
"operatorRingTimeoutSeconds": 0 // Integer, optional,
"operatorNoAnswerMessage": "string" // String, optional,
"operatorNoAnswerAction": "string" // String,
"twilioNumberSid": "string" // String, optional,
"a2pStatus": "string" // String, optional,
"webhookWarning": "string" // String, optional
}

WorkflowBlockerResponse

FieldTypeRequiredDescription
idInteger
nameString
uuidString

Example:

{
"id": 0 // Integer,
"uuid": "string" // String,
"name": "string" // String
}

Endpoints

List

GET /api/v2/w/{workspace_uuid}/phone-numbers

Description:

List phone numbers for the workspace, filtered by archive status.

Access: All workspace members can view phone numbers (workspace-scoped resource).

Authorization: Requires phones:read scope

Parameters:

  • is_archived (Boolean)

Response: List of PhoneNumberResponse


Create

POST /api/v2/w/{workspace_uuid}/phone-numbers

Description:

Create a new phone number for the authenticated user. Requires phones:write scope.

If providerPhoneUuid is provided, looks up the provider phone, verifies org ownership, and sets bidirectional references. Otherwise falls back to looking up by number string in the global pool.

Authorization: Requires phones:write scope

Parameters:

  • phone (CreatePhoneNumberRequest)

Response: See PhoneNumberResponse


Linkable Phones

GET /api/v2/w/{workspace_uuid}/phone-numbers/linkable-phones

Description:

List provider phones available for linking to workspace phone numbers.

Returns org-owned provider phones that are either:

  • Unassigned (available to any workspace in the org)
  • Already assigned to this workspace (for re-linking or viewing)

Requires PHONES_WRITE scope.

Authorization: Requires phones:write scope


Get Phone Number Id

GET /api/v2/w/{workspace_uuid}/phone-numbers/{phone_number_id}

Description:

Get a specific phone number by ID or UUID.

Authorization: Requires phones:read scope

Parameters:

  • phone_number_id (String)

Response: See PhoneNumberResponse


Update Phone Number Id

PUT /api/v2/w/{workspace_uuid}/phone-numbers/{phone_number_id}

Description:

Update an existing phone number by ID or UUID. Requires phones:write scope.

Authorization: Requires phones:write scope

Parameters:

  • phone_number_id (String)
  • phone_update (UpdatePhoneNumberRequest)

Response: See PhoneNumberResponse


Archive

POST /api/v2/w/{workspace_uuid}/phone-numbers/{phone_number_id}/archive

Description:

Archive a phone number, releasing the Twilio number back to the pool.

Call and SMS history is preserved. This action cannot be undone.

Authorization: Requires phones:admin scope

Parameters:

  • phone_number_id (String)

Response: See PhoneNumberResponse


Archive Blockers

GET /api/v2/w/{workspace_uuid}/phone-numbers/{phone_number_id}/archive-blockers

Description:

Return workflow blockers that prevent archiving this phone number.

Authorization: Requires phones:admin scope

Parameters:

  • phone_number_id (String)

Response: See ArchiveBlockersResponse


Link

POST /api/v2/w/{workspace_uuid}/phone-numbers/{phone_number_id}/link

Description:

Link or unlink a workspace phone number to/from a provider phone.

If providerPhoneUuid is provided, sets bidirectional references between the workspace phone and the GLB provider phone. If null, clears the link.

Requires PHONES_WRITE scope.

Authorization: Requires phones:write scope

Parameters:

Response: See PhoneNumberResponse