v2

latestOpenAPI 3.1.02026-07-313981108.2 KB
Phone Numbers

Update Number

To attach or detach assistant to the number, or enable or disable the inbound/outbound call.

put/assistants/v1/numbers/{id}

Path parameters

idstring required

The ID of the number to update.

Request body

assistantIdstring

To attach assistant, give id of the assistant. To detach assistant, give empty string.

inboundEnabledboolean

To enable inbound call, set to true. To disable inbound call, set to false.

outboundEnabledboolean

To enable outbound call, set to true. To disable outbound call, set to false.

Example request

{
  "assistantId": "a12f9c88-c155-461f-9771-4d240cdc9a04",
  "inboundEnabled": true,
  "outboundEnabled": true
}

Response

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