v2

latestOpenAPI 3.1.02026-07-313981108.2 KB
Phone Numbers

Import Number

Import number from provider. Please add provider credentials in the provider credentials section before you import an phone number.

post/assistants/v1/numbers/{provider}

Path parameters

providerstring required

Give your provider name. Ex: twilio, Available providers: twilio

Request body

numberstring required

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

labelstring

Label for the number

Example request

{
  "number": "+1234567890",
  "label": "friendly-name-1",
  "credentials": {
    "accountSid": "AC1234567890",
    "authToken": "1234567890"
  }
}

Response

Successfully imported 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"
}