Login / Register
PATCH
/api/public/v1/call-scripts/{scriptId}/nodes/{nodeId}

Update a call script step

Edits what a step says or does. Only the fields you send change; send null to clear `body`, `note`, `outcome`, `action` or `actionUrl`. Where the step sits in the tree is the move endpoint.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.

call-scripts:write

Path Parameters

NameTypeRequiredDescription
scriptIdstringRequiredScript ID.
nodeIdstringRequiredThe step’s id, from the script’s `nodes`.

Request Body

PropertyTypeDescription
typestringSTATEMENT, ACTION and NOTE are content — what the rep says, does, or is told. RESPONSE (what the prospect said back), BRANCH_IF and BRANCH_ELSE (a situation the rep is in) are the forks, drawn as the buttons the rep clicks to go on. A content step with no children shows inline under its parent; one with children becomes a "Continue" step.
labelstringThe short line the rep scans mid-call — the branch button’s text or the step’s heading. One line, 500 characters at most.
bodystringThe full talk track, said verbatim. Optional: a RESPONSE’s label is usually the whole thing. Send null to clear.
notestringA coaching aside shown to the rep and never spoken. Send null to clear.
outcomestringOn a step that ends the call: how it ended, which pre-fills the wrap-up. Send null to clear.
actionstringA tool the step puts in the rep’s hand: SCHEDULE_MEETING, SEND_PRICING (sends `actionUrl` to an email the rep collects) or CAPTURE_NOTE. Send null for none.
actionUrlstringThe link the action works with — the pricing page for SEND_PRICING. http or https.
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}/nodes/{nodeId}" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Is now a bad time?",
    "note": "Smile — they can hear it."
  }'
200Example response
json
{
  "message": "Step updated successfully!",
  "content": {
    "node": {
      "id": "nod_1",
      "scriptId": "scr_6620",
      "parentId": null,
      "type": "STATEMENT",
      "order": 0,
      "label": "Hi, is now a bad time?",
      "body": null,
      "note": null,
      "outcome": null,
      "action": null,
      "actionUrl": null,
      "createdAt": "2026-06-30T08:00:00.000Z",
      "updatedAt": "2026-06-30T08:00:00.000Z"
    }
  }
}
404Example response
json
{
  "message": "Step not found."
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

xRM → Scripts
/xrm/scripts
  1. Open a script and select a step.