v2

latestOpenAPI 3.1.02026-07-313981108.2 KB
Phone Numbers

Purchase Number

Purchases a number.

post/assistants/v1/numbers/purchase

Request body

numberstring

Phone number to purchase. Please provide in E.164 format, Ex: +1234567890

Example request

{
  "number": "+1234567890"
}

Response

Successfully purchased the number.

_idstring objectId required

Unique identifier of the number

teamIdstring objectId required

This is unique identifier of the team.

numberstring required

Phone number associated with the team

assistantIdstring

ID of the associated assistant (if any)

inboundEnabledboolean

If true, inbound call is enabled. If false, inbound call is disabled.

outboundEnabledboolean

If true, outbound call is enabled. If false, outbound call is disabled.

labelstring

Label for the number

Example response

{
  "_id": "a12f9c88-c155-461f-9771-4d240cdc9a04",
  "teamId": "1f7b1b1b1b1b1b1b1b1b1b1b",
  "number": "+1234567890",
  "provider": {
    "name": "twilio"
  },
  "assistantId": "a12f9c88-c155-461f-9771-4d240cdc9a04",
  "inboundEnabled": true,
  "outboundEnabled": true,
  "label": "friendly-name-1"
}