POST
/api/public/v1/build-sessions/{sessionId}/archiveArchive a build session
Put a session away: it stops being polled, its open pull requests are closed on GitHub, and it leaves everyone’s list but an engineer’s. The branch, the pull request link and the conversation are kept, so an engineer can reopen it. Anyone may archive their own session; an engineer may archive anyone’s. This is how a ticket is freed to be built again without destroying the attempt.
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:write
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string | Required | Build session ID. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/build-sessions/{sessionId}/archive" \
-H "Authorization: Bearer your_access_token"200Example response
json
{
"message": "Build session archived 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.