Login / Register
GET
/api/public/v1/call-scripts/{scriptId}/runs

List a call script’s runs

The calls made with one script — every rep’s, newest first — each with its `path`, the ids of the steps the rep visited, in order. `summary` covers the script’s whole history rather than this page: `outcomes` counts how calls ended, and `nodeVisits` counts how many times each current step was visited, 0 for one nobody has reached — the place to look for dead branches and for where calls stall.

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:read

Path Parameters

NameTypeRequiredDescription
scriptIdstringRequiredScript ID.

Query Parameters

NameTypeRequiredDescription
limitnumberOptionalMaximum number of items to return (1-100).Default: 20
offsetnumberOptionalNumber of items to skip before starting to collect the result set.Default: 0
sortBystringOptionalField to sort by. Allowed values vary by endpoint.Default: createdAt
sortOrderstring
asc
desc
OptionalSort direction.Default: desc
searchstringOptionalFree-text search across the resource’s primary fields.
createdAfterstringOptionalISO 8601 timestamp — only return items created after this time.
createdBeforestringOptionalISO 8601 timestamp — only return items created before this time.
updatedAfterstringOptionalISO 8601 timestamp — only return items updated after this time.
outcomestring
CONNECTED
MEETING_BOOKED
CALLBACK_REQUESTED
GATEKEEPER_INFO
VOICEMAIL
NO_ANSWER
NOT_INTERESTED
BAD_NUMBER
OptionalOnly calls that ended this way.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}/runs" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Call script runs retrieved successfully!",
  "content": {
    "runs": [
      {
        "id": "run_1",
        "scriptId": "scr_6620",
        "outcome": "MEETING_BOOKED",
        "path": [
          "nod_1",
          "nod_2"
        ],
        "startedAt": "2026-08-05T15:00:00.000Z",
        "endedAt": "2026-08-05T15:04:10.000Z",
        "durationSeconds": 250
      }
    ],
    "pagination": {
      "total": 42,
      "limit": 20,
      "offset": 0,
      "hasMore": true
    },
    "summary": {
      "totalRuns": 61,
      "outcomes": {
        "MEETING_BOOKED": 9,
        "NOT_INTERESTED": 30,
        "UNRECORDED": 3
      },
      "nodeVisits": [
        {
          "nodeId": "nod_1",
          "parentId": null,
          "type": "STATEMENT",
          "label": "Hi, is now a bad time?",
          "visits": 61
        }
      ]
    }
  }
}

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 the ⋯ menu on a script → Call history.