Skip to main content
PATCH
FIXED · number Website chat and website voice offer eligible custom functions only. Built-in calendar booking and availability are excluded. Phone and eligible SMS can use a configured calendar. NOT OFFERED → do this instead · number Website install code is available only from the dashboard for now. The public API does not return ready-to-paste install HTML. Use the dashboard Install action for each customer’s number. The settings read includes install_id. An install receipt only reports that a widget was seen. YOU CAN CHANGE · number Enable website custom functions only when every enabled function on that number is safe for public visitors. To offer booking, share the business’s booking link or hand off to phone or SMS. Website voice uses one stored switch: phone_numbers.web_calls_enabled. Number PATCH (web_calls_enabled), web-agent PATCH (settings.web_calls_enabled) and web-calls integration PUT (enabled) write the same value. SCOPE · number Configure each number’s sms_prompt for SMS and web_prompt for website chat and voice. Neither channel inherits its phone custom_prompt. Both still use the agent knowledge enabled for that channel and follow their own channel rules. Read the compact AI rules Update website agent settings for one owned number using its current revision. A stale revision is refused so another editor’s change is preserved.
Method: PATCH ·
Success: 200 ·
Scope: Owning account
The important part
  • Change only the intended web settings.
  • Read back the result and test the actual browser flow before rollout.
The stored website voice switch is phone_numbers.web_calls_enabled. These three requests write that same value: PATCH /v1/phone-numbers/{phoneNumber} with web_calls_enabled, PATCH /v1/agent-web/{number} with settings.web_calls_enabled, and PUT /v1/integrations/web-calls/number/{phoneNumber} with enabled. The number’s web agent must also allow website access. Use Install in the dashboard for the number’s embed code. A public install-code API is not offered.

Authentication

Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential. Send Content-Type: application/json.

Request fields

Send a JSON object. Read defaults describe the displayed value, not necessarily a persisted setting. web_agent_enabled is read-only on this endpoint. The inbox feature must be enabled; responses use Cache-Control: no-store. Read this number’s settings first and preserve revision as a string. Numeric decimal revisions are also accepted, but strings avoid precision loss. An accepted change increments the revision. The entire web_appearance object is replaced when supplied: preserve the fields you intend to keep. Its footer is always Powered by Nixflex. Contact field IDs must be unique; custom before-call fields must exist in contactFields. No nested merge is performed.

Response fields

200 OK returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.

Example request

These examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. Keep NIXFLEX_API_KEY private. cURL uses Bash; CLI uses PowerShell and reads the key through NIXFLEX_API_KEY. Replace fixture identifiers and reserved example numbers with approved account-owned values. Configure the existing MCP installation for the same account at https://api.nixflex.com before using the shown tool arguments. Python shows the synchronous client; AsyncNixflex uses the same method with async with and await. This example changes state. Review the target and payload before running it.

Example response

Illustrative 200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.

Errors

Failures return an error object with code, message, doc_url and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.

Retry and idempotency

No idempotency key is documented. A timeout or 5xx can follow a committed change. Read the current state before deciding whether to submit again; never automatically repeat an uncertain write. Do not retry a stale revision unchanged. Reload after 409, compare the changed settings, then submit only the intended edit with the new revision.

Authorizations

Authorization
string
header
required

KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.

Path Parameters

number
string
required

International number with + and digits; no spaces.

Pattern: ^\+[1-9][0-9]{6,14}$

Body

application/json
revision
string
required

Opaque decimal revision. Keep as a string to avoid precision loss.

Pattern: ^[0-9]{1,18}$
settings
object
required

At least one setting. Omitted top-level settings stay unchanged. Unknown settings are refused.

Response

OK

phone_number
string
required

International number with + and digits; no spaces.

Pattern: ^\+[1-9][0-9]{6,14}$
agent_id
string | null
required

Assigned agent.

web_prompt
string | null
required

Saved website instructions.

web_appearance
object | null
required

Complete appearance value, not a nested merge. Database JSON representation must be at most 32,000 bytes.

appearance_version
integer
required

Current appearance schema version.

web_design
integer
required

Saved design, displayed as 1 when unset.

web_color
string
required

Saved colour, displayed as #25D366 when unset.

web_name
string
required

Saved name, displayed as empty when unset.

web_chips
string
required

Saved comma-separated questions, empty when unset.

web_calls_enabled
boolean
required

Saved voice setting, false when unset.

web_agent_enabled
boolean | null
required

Current chat enabled setting; read-only here.

revision
string
required

Opaque decimal settings revision. Send current value in PATCH; 0 before an installation exists.

install_id
string | null
required

Public widget installation ID, not an API credential.

first_seen_at
string<date-time> | null
required

Saved timestamp, or null.

last_seen_at
string<date-time> | null
required

Saved timestamp, or null.