Skip to main content
POST
Cancel coding session

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Path Parameters

session_id
string
required

The session's identifier.

Pattern: ^[a-f0-9]{24}$
Example:

"6820f3a4e7b91d003c45a1f2"

app_id
string
required

Response

Successful Response

id
string
required

The session's opaque identifier.

Example:

"6820f3a4e7b91d003c45a1f2"

state
enum<string>
required

The session's state: queued, running, opening_pull_request, needs_input, completed, failed, cancelling, or cancelled.

Available options:
queued,
running,
opening_pull_request,
needs_input,
completed,
failed,
cancelling,
cancelled
Example:

"running"

message_id
string | null
required

The UUID of the session's user message, or null before dispatch. Queued processing updates it to the UUID used for the turn.

Example:

"ca00e880-1111-4444-aaaa-ccddeeff0011"

repository_full_name
string
required

The connected repository the session runs in.

Example:

"acme/project"

branch_id
string | null
required

The session's Base Code branch identifier, or null before provisioning.

Example:

"6820f3a4e7b91d003c45a1f3"

branch_name
string | null
required

The session's working Git branch, or null before provisioning.

Example:

"codex/session-6820f3a4e7b91d003c45a1f2"

session_url
string | null
required

The Base Code editor URL for inspecting the session or answering pending questions, or null until its branch is provisioned.

Example:

"https://app.base44.com/apps/6820f3a4e7b91d003c45a1f2/editor/preview"

pull_request
SessionPullRequest · object | null
required

The session's pull request, or null until one is opened.

Example:
error_code
string | null
required

The stable failure cause, or null if there is no failure.

Example:

"execution_failed"

launch_key
string | null

The original Idempotency-Key, or null for sessions created before key recovery was recorded. Use the same principal and key to retry a queued launch.

Example:

"flag-cleanup-123"

client_reference
string | null

Your application reconciliation reference, or null.

Example:

"release-task-123"

input_request_id
string | null

Opaque identifier of the current question or approval pause, or null when the session is not waiting for input or the pause predates identifier tracking. Use it to deduplicate notifications for repeated input requests.

Example:

"ca00e880-1111-4444-aaaa-ccddeeff0011"