Logo
Search
Docs

Fields & validation

Every field with its exact validation rule, nullability, and the database column that stores it.

Update body

FieldTypeNullableRules (verbatim)DB column
namestringyesnullable|string|max:255assistant_phone_number_configurations.name
vapi_assistant_idstringyesnullable|string|max:255assistant_phone_number_configurations.vapi_assistant_id
vapi_squad_idstringyesnullable|string|max:255assistant_phone_number_configurations.vapi_squad_id
vapi_workflow_idstringyesnullable|string|max:255assistant_phone_number_configurations.vapi_workflow_id
sms_enabledbooleanyesnullable|booleanassistant_phone_number_configurations.sms_enabled
static_ip_enabledbooleanyesnullable|booleanassistant_phone_number_configurations.static_ip_enabled
fallback_destinationobjectyesnullable|arrayassistant_phone_number_configurations.fallback_destination
serverobjectyesnullable|arrayassistant_phone_number_configurations.server
hooksarrayyesnullable|arrayassistant_phone_number_configurations.hooks

fallback_destination

FieldRules (verbatim)
fallback_destination.typenullable|string|in:number,sip
fallback_destination.numbernullable|required_if:fallback_destination.type,number|string|regex:/^\+[1-9]\d{6,14}$/
fallback_destination.sipUrinullable|required_if:fallback_destination.type,sip|string|max:255
fallback_destination.messagenullable|string|max:1000
fallback_destination.descriptionnullable|string|max:1000
fallback_destination.extensionnullable|string|max:255
fallback_destination.callerIdnullable|string|regex:/^\+[1-9]\d{6,14}$/

Sending fallback_destination as null or {} clears it entirely. Otherwise, empty sub-fields (null or "") are dropped and the remaining non-empty sub-fields are stored as-is.

server

FieldRules (verbatim)
server.urlnullable|string|url|max:2048
server.secretnullable|string|max:2048
server.timeoutSecondsnullable|numeric|min:1|max:300
server.credentialIdnullable|string|max:255
server.headersnullable|array — a header-name/value map, not rows
server.headers.*nullable|string|max:4096

Sending server as null or {} clears the whole block (and turns off static_ip_enabled locally, since it lives on the same upstream object). Otherwise each present sub-field either replaces the stored value or, if sent empty (null or ""), clears just that sub-field while leaving the rest of server intact.

Constraints the rules cannot express

  • Exactly one of vapi_assistant_id, vapi_squad_id, vapi_workflow_id may resolve to a value at a time — sending more than one non-empty target is rejected with 422 before any write is attempted.
  • Setting one routing target explicitly clears the other two, both locally and on the live platform.
  • static_ip_enabled is a first-class column locally, but on the live platform it is always written as server.staticIpAddressesEnabled — there is no separate top-level upstream field for it.
  • The update endpoint requires the number to already carry an upstream id (vapi_phone_number_id) — the endpoint resolves it automatically by re-matching the stored number if missing, but if it still cannot be resolved the update is rejected with 422.
  • The live platform is written first on update; on failure nothing is saved locally, so the local row and the live configuration can never diverge from a partial write.