Phone

Phones.batch_create_or_update

Creates or updates Phone records in one request: an item with an id updates that record, an item without one creates a new record.

post/entities/Phones/batch-modify

Request

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.

rollback-method0 | 1

0, the default: one failed item fails the whole batch (HTTP 422, or 404 for an unknown id) and nothing is written. 1: the valid items are written and the call answers 200 with success false and one result per item, an id or an error, in input order. Check every item.

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.

idstring uuid

ID of object to update.

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

Result per item, in request order: the id of the created or updated record, or the error.

successboolean

True when the request succeeded; false on error.

Example response

{
  "success": true,
  "data": [
    {
      "http_status": 400,
      "code": 117,
      "name": "ERROR_PARAMETER_INVALID"
    }
  ]
}

Changes

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