GET
/api/public/v1/call-scripts/{scriptId}

Get a call script

The script with its whole branching tree in `nodes`, ordered — which is what a rep actually runs.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

call-scripts:read

Path Parameters

NameTypeRequiredDescription
scriptIdstringRequiredScript ID.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Call script retrieved successfully!",
  "content": {
    "script": {
      "id": "scr_6620",
      "locationId": "loc_abc123",
      "name": "Outbound — cold",
      "description": "For a first call to a list lead.",
      "isDefault": true,
      "archivedAt": null,
      "createdAt": "2026-06-30T08:00:00.000Z",
      "updatedAt": "2026-08-04T08:00:00.000Z"
    },
    "nodes": [
      {
        "id": "nod_1",
        "type": "STATEMENT",
        "order": 0,
        "label": "Hi, is now a bad time?"
      }
    ]
  }
}

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 from the list.