DELETE
/api/public/v1/build-sessions/{sessionId}

Delete a build session

Throw a session away for good: the row, its conversation, the hosted agent, its pull requests and its branch. Engineers only, and there is no undo — archive instead to keep the work and free the ticket to be built again.

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.

builder:engineer

Path Parameters

NameTypeRequiredDescription
sessionIdstringRequiredBuild session ID.
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/build-sessions/{sessionId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Build session deleted successfully!",
  "content": {
    "buildSessionId": "bse_a1b2c3"
  }
}

In the console

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

Builder
/builder
  1. Open a session.
  2. Actions → Delete.