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

Delete a call script

Deletes the script and its tree. The runs recorded against it are what happened on real calls, so archive instead — `PATCH` with `archived: true` — if that history matters.

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

NameTypeRequiredDescription
scriptIdstringRequiredScript ID.
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/call-scripts/{scriptId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Call script deleted successfully!",
  "content": {
    "scriptId": "scr_6620"
  }
}

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 → Delete.