v1

latestOpenAPI 3.1.02026-08-061,5107704.5 MB
Phone

Phones.update

Modifies Phone or Phones with given id(s)

patch/entities/Phones/{id}

Path parameters

idstring uuid required

ID of Phone to update

Query parameters

validation-levelinteger

Specify validation level of Phone on update. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.

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

Field whose values are strictly defined with an enumeration of values.

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

Modification confirmation. Returns resulting Phone

successboolean

True when response 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"
  }
}