ReferenceHTTP APISessions

What the session made: the pull requests it opened and the reviews it submitted

GET
/v1/sessions/{id}/outcomes

The session's outcomes, oldest first. Each pull request the platform's pull request opening recorded is one github_pull_request outcome, written in the same transaction as its open_pull_request receipt (receipt_id); opening it again for a later push request of the session answers the same pull request and adds none. Each review the session submitted is one github_review outcome, written in the same transaction as its review_pull_request receipt: url is the review's, external_id the review id, state always submitted, and metadata the pull request number, the event, the commit_id reviewed and opened_by_session_id (null for a pull request the platform did not open); never the review's body. Only the server writes outcomes.

A pull request's state is open, merged or closed as GitHub last answered, at state_checked_at (null until the first answer): GitHub tells the platform nothing, so the platform reads each pull request again on an interval (every 5 minutes in its first day, hourly to 30 days, then daily; a closed one daily for 30 days; a merged one never). A failed read keeps the state and sets check_error (not_found, forge_failed, github_refused). metadata.adopted is true when the platform answered a pull request it did not create, already open for the session's branch, and null when unknown. metadata.title is the pull request's title cut to 200 characters, as the platform sent it or GitHub last answered; null until the first read of one the platform did not create, and on a row written before titles were kept until its next read, so a pull request already merged then keeps null. A review is never read again. Reading changes nothing.

Scope: sessions:read (API key or cookie session).

Authorization

headerAuthorizationBearer <token>

For servers and scripts: an API key sent as an HTTP bearer token, Bearer <key>. It holds exactly the scopes it was issued with; a key issued before scopes existed holds none. It never needs the CSRF header, and it cannot manage agents, members, teams or API keys. Issue one in the web console under Settings → API keys; each operation names the scope it needs.

Scope: sessions:read

Path Parameters

id*string

The session's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

The outcomes, oldest first.

application/json
  1. response
items*array<|>
Example Request
curl -X GET 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/outcomes'
Example Response
{  "items": [    {      "id": "6c1f5b0e-2d7a-4e8b-9f3c-1a2b3c4d5e6f",      "type": "github_pull_request",      "url": "https://github.com/acme/sample-app/pull/12",      "repository_id": "sample-app",      "external_id": "12",      "state": "merged",      "state_changed_at": "2026-10-30T10:02:11.000Z",      "merged_at": "2026-10-30T10:01:58.000Z",      "closed_at": "2026-10-30T10:01:58.000Z",      "state_checked_at": "2026-10-30T10:02:11.000Z",      "check_error": null,      "metadata": {        "title": "Retry failed payment webhooks",        "head": "agent/0f8b6a52-3d1e-4c7a-9b2f-5e6d7c8a9b01",        "base": "main",        "adopted": false,        "merge_commit_sha": "9f2c1e0b7a6d5c4b3a2918f7e6d5c4b3a2918f7e",        "additions": 42,        "deletions": 7,        "changed_files": 3,        "commits": 2      },      "created_at": "2026-10-30T09:40:03.000Z"    },    {      "id": "6c1f5b0e-2d7a-4e8b-9f3c-1a2b3c4d5e70",      "type": "github_review",      "url": "https://github.com/acme/sample-app/pull/9#pullrequestreview-2104",      "repository_id": "sample-app",      "external_id": "2104",      "state": "submitted",      "state_changed_at": "2026-10-30T10:20:00.000Z",      "merged_at": null,      "closed_at": null,      "state_checked_at": null,      "check_error": null,      "metadata": {        "number": 9,        "event": "APPROVE",        "commit_id": "1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d",        "opened_by_session_id": null      },      "created_at": "2026-10-30T10:20:00.000Z"    }  ]}