Skip to main content
PUT

Overview

Update the details of one of your phone numbers, such as its provider credentials or SIP connection settings. Send only the fields you want to change; the values are saved as sent. Unlike Add Phone Number, this endpoint doesn’t check credentials with the provider or set up call events again. Make sure new credentials are correct before you save them. To change which agent handles a number, assign the agent from the dashboard’s Phone Numbers page.

Prerequisites

  • An API key for your workspace
  • The phone number’s ID (_id from Get Phone Numbers). The number must have been added by the user who owns the API key.

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
ID of the phone number to update.

Request Parameters

All fields are optional. _id, userId, organization, createdAt and updatedAt are ignored if sent.
string
The phone number, with + and country code. Not used for SIP connections.
string
Account ID from your telephony provider.
string
Auth token or API key from your telephony provider.
string
SIP only: SIP server host.
integer
SIP only: SIP server port.
string
SIP only: SIP username.
string
SIP only: SIP password.
string
SIP only: the “from” user for outgoing calls.
string
SIP only: udp, tcp or tls.
boolean
SIP only: whether to register with the SIP server.
string
Elisiontec only: list ID.

Response

object
The updated phone number record. It also contains the stored credentials, so don’t log the response.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request – Invalid Phone ID.
  • 401 Unauthorized – Missing or invalid API key.
  • 404 Not Found – Phone not found: the number doesn’t exist or wasn’t added by the user who owns the API key.
  • 500 Internal Server Error – Unexpected server error.