Phone

Phones.update

Changes fields of the Phone record with the given id; fields left out keep their values.

patch/entities/Phones/{id}

Request

Path parameters

idstring uuid required

Id of the Phone record to update.

Query parameters

validation-levelinteger

Bit mask that relaxes validation on this write. 0 (the default) validates everything. Bits: 2 skip unchanged fields, 4 skip admin-defined validations, 8 allow read-only fields, 16 skip relation checks, 32 skip value checks, 64 skip invalid recalculations, 128 skip step-checklist gates, 256 add conditional field requirements, 512 skip uniqueness checks. Add bits together (20 = 4 + 16); member names and comma lists such as 4,16 work too. A value with an internal-only bit is refused with HTTP 400, code 117.

Request body

error_codeinteger

Error code recorded for the phone, set on integration failures (e.g. provider rejected the last send) or when the user disables the integration; empty when the phone is healthy.

namestring

Name of the entity and its default text representation.

owner_idstring uuid

Id of the assigned user, or empty when the phone is a company-level resource.

phone_numberstring

Phone number in E.164 format (e.g. "+12025550123").

twilio_caller_sidstring

External caller identifier from the calling provider (e.g. Twilio caller SID).

type1 | 2 | 3 | 4 | 5 | 6

Channel and assignment of the phone number: calling only, calling and SMS (unassigned, personal to the owner or shared by the company), or a personal or company WhatsApp account.

Integer enum value: 1 - Calling, 2 - CallingSmsUnassigned, 3 - CallingSmsPersonal, 4 - CallingSmsCompany, 5 - WhatsAppPersonal, 6 - WhatsAppCompany

revisioninteger

Revision when entity was lastly changed.

enabledboolean

False when the user has disabled the calling/SMS integration on this phone (error_code is set to indicate user disablement); true otherwise.

Example request

{
  "error_code": 1,
  "name": "string",
  "owner_id": "01234567-abcd-dcba-ffff-000000000000",
  "phone_number": "string",
  "twilio_caller_sid": "string",
  "type": 1,
  "revision": 1
}

Response

The changed Phone record.

successboolean

True when the request succeeded; false on error.

Example response

{
  "success": true,
  "data": {
    "id": "01234567-abcd-dcba-ffff-000000000000",
    "modified": "2019-01-01T00:00:00",
    "created": "2019-01-01T00:00:00",
    "error_code": 1,
    "name": "string",
    "owner_id": "01234567-abcd-dcba-ffff-000000000000",
    "phone_number": "string",
    "twilio_caller_sid": "string",
    "type": 1,
    "revision": 1,
    "message_forwarding_email": "string",
    "call_forwarding_phone": "string"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.