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

Move 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

NameTypeRequiredDescription
scriptIdstringRequiredScript ID.
nodeIdstringRequiredThe step to move.

Request Body

PropertyTypeDescription
parentIdstringThe new parent. Leave out to reorder under the current one; null makes it a root step.
ordernumberIts 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.

xRM → Scripts
/xrm/scripts
  1. Open a script and use the arrows on a step.