POST
/api/public/v1/call-scripts/{scriptId}/nodes/{nodeId}/moveMove a call script step
Reorders a step among its siblings, or moves it under another step of the same script with its whole branch. A step can’t be moved inside its own branch. Sibling order is kept contiguous from 0 on both sides of the move.
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. |
nodeId | string | Required | The step to move. |
Request Body
| Property | Type | Description |
|---|---|---|
parentId | string | The new parent. Leave out to reorder under the current one; null makes it a root step. |
order | number | Its index among the destination’s children, from 0. Clamped to the end. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}/nodes/{nodeId}/move" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"parentId": "nod_1",
"order": 0
}'200Example response
json
{
"message": "Step moved successfully!",
"content": {
"nodeId": "nod_2"
}
}400Example response
json
{
"message": "A step cannot be moved inside itself."
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.