POST
/api/public/v1/build-sessions/{sessionId}/reopen

Reopen an archived session

Undo an archive: the session comes back to DRAFT with its pull request restored where GitHub still allows it, or to CODING with no pull request. Engineers only, and only for an archived session — one whose pull requests all merged has nothing to restore; message it instead to carry the work on in a new one.

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.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/build-sessions/{sessionId}/reopen" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Build session reopened 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 an archived session.
  2. Actions → Reopen.