Skip to main content
PATCH
Update Agent Structure
PATCH /workflows/:id/structure Add or edit an agent’s funnel statuses and custom lead fields. Rows are upserted by key: an unrecognized key is inserted, an existing key is updated. This endpoint never deletes — removing a status or field stays a deliberate dashboard action, so leads already sitting on a status are never orphaned.

Path Parameters

Request Body

Provide statuses, fields, or both.

statuses[] shape

fields[] shape

Responses

200 — Updated

statuses_upserted / fields_upserted are only present for the arrays you sent.

400 — Validation error

Also returned as "each status needs a key and a label" or "each field needs a key and a label". Field validation can also return invalid_field_type, invalid_metadata_key, or invalid_intake_value_map in error, with the rejected property in field.

401 — Authentication error

See Authentication.

404 — Not found

500 — Internal server error

Authorizations

X-API-Key
string
header
required

API key for authentication. Keys are prefixed with nxr_live_.

Path Parameters

id
string<uuid>
required

Workflow identifier.

Body

application/json
statuses
object[]
required
fields
object[]

Response

Successful response.

success
enum<boolean>
required
Available options:
true
workflow_id
string<uuid>
required
statuses_upserted
integer
fields_upserted
integer
Last modified on September 25, 2026