GET
/api/public/v1/call-scripts

List call scripts

The branching scripts reps follow on a call, per location. `_count.runs` says how often each has actually been used, which is the fastest way to tell a live script from an abandoned one.

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

Query Parameters

NameTypeRequiredDescription
locationIdstringRequiredWhose scripts to read.
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.
archivedbooleanOptionalOmit for both, `false` for live scripts, `true` for the archive.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/call-scripts" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Call scripts retrieved successfully!",
  "content": {
    "scripts": [
      {
        "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",
        "_count": {
          "nodes": 14,
          "runs": 61
        }
      }
    ],
    "pagination": {
      "total": 42,
      "limit": 20,
      "offset": 0,
      "hasMore": true
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

xRM → Scripts
/xrm/scripts