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

Stop the agent

Stop the agent mid-turn so you can say something else — the composer’s Stop button. Nothing is rolled back: the work it has already done stands, and the next message picks up from there. The session’s status does not move; only `progress.interrupted` does. Owner only, like messaging. A 409 says there was nothing running to stop.

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

NameTypeRequiredDescription
sessionIdstringRequiredBuild session ID.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/build-sessions/{sessionId}/interrupt" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Agent stopped 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. Stop, in the composer.