POST
/api/public/v1/call-scripts/{scriptId}/nodesAdd a step to a call script
Adds one step under `parentId`, or as a new root step when it is null or left out, placed after its siblings. A branch is built by adding a RESPONSE (or BRANCH_IF / BRANCH_ELSE) and then the steps under it. To write a whole script at once, use the tree endpoint instead.
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
| Name | Type | Required | Description |
|---|---|---|---|
scriptId | string | Required | Script ID. |
Request Body
| Property | Type | Description |
|---|---|---|
parentId | string | The step this goes under, from the same script. Null for a root step. |
type | string | STATEMENT, 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. |
label | string | The short line the rep scans mid-call — the branch button’s text or the step’s heading. One line, 500 characters at most. |
body | string | The full talk track, said verbatim. Optional: a RESPONSE’s label is usually the whole thing. Send null to clear. |
note | string | A coaching aside shown to the rep and never spoken. Send null to clear. |
outcome | string | On a step that ends the call: how it ended, which pre-fills the wrap-up. Send null to clear. |
action | string | A 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. |
actionUrl | string | The link the action works with — the pricing page for SEND_PRICING. http or https. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}/nodes" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"parentId": "nod_1",
"type": "RESPONSE",
"label": "Yeah, what is this about?",
"note": "Keep it light."
}'200Example response
json
{
"message": "Step added 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"
}
}
}400Example response
json
{
"message": "Parent step not found in this script."
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.