Fields & validation
Every field with its exact validation rule, nullability, and the database column that stores it.
Update body
| Field | Type | Nullable | Rules (verbatim) | DB column |
|---|---|---|---|---|
name | string | yes | nullable|string|max:255 | assistant_phone_number_configurations.name |
vapi_assistant_id | string | yes | nullable|string|max:255 | assistant_phone_number_configurations.vapi_assistant_id |
vapi_squad_id | string | yes | nullable|string|max:255 | assistant_phone_number_configurations.vapi_squad_id |
vapi_workflow_id | string | yes | nullable|string|max:255 | assistant_phone_number_configurations.vapi_workflow_id |
sms_enabled | boolean | yes | nullable|boolean | assistant_phone_number_configurations.sms_enabled |
static_ip_enabled | boolean | yes | nullable|boolean | assistant_phone_number_configurations.static_ip_enabled |
fallback_destination | object | yes | nullable|array | assistant_phone_number_configurations.fallback_destination |
server | object | yes | nullable|array | assistant_phone_number_configurations.server |
hooks | array | yes | nullable|array | assistant_phone_number_configurations.hooks |
fallback_destination
| Field | Rules (verbatim) |
|---|---|
fallback_destination.type | nullable|string|in:number,sip |
fallback_destination.number | nullable|required_if:fallback_destination.type,number|string|regex:/^\+[1-9]\d{6,14}$/ |
fallback_destination.sipUri | nullable|required_if:fallback_destination.type,sip|string|max:255 |
fallback_destination.message | nullable|string|max:1000 |
fallback_destination.description | nullable|string|max:1000 |
fallback_destination.extension | nullable|string|max:255 |
fallback_destination.callerId | nullable|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
| Field | Rules (verbatim) |
|---|---|
server.url | nullable|string|url|max:2048 |
server.secret | nullable|string|max:2048 |
server.timeoutSeconds | nullable|numeric|min:1|max:300 |
server.credentialId | nullable|string|max:255 |
server.headers | nullable|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_idmay 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_enabledis a first-class column locally, but on the live platform it is always written asserver.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.