PATCH
/api/public/v1/call-scripts/{scriptId}Update a call script
Renames it, re-describes it, archives it, or makes it the location’s default — promoting one demotes the incumbent, since a location has exactly one default. The branching tree is edited node by node in the console rather than here.
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:write
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
scriptId | string | Required | Script ID. |
Request Body
| Property | Type | Description |
|---|---|---|
name | string | |
description | string | |
isDefault | boolean | Setting true demotes whichever script was default. |
archived | boolean | Archive it, or bring it back with false. |
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"isDefault": true
}'200Example response
json
{
"message": "Call script updated 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"
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.