Get coding session

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Read a coding session's progress and pull request. Authenticate with a platform Bearer token whose user has editor access to the app. Limited to 60 requests per minute per user. Responses include X-Request-Id and rate-limit headers.

get/api/apps/{app_id}/imported/sessions/{session_id}

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/imported/sessions/{session_id}
  • Auth: HTTP bearer

Path parameters

session_idstring required

The session's identifier.

Example:6820f3a4e7b91d003c45a1f2
app_idstring required

Response

Successful Response

launch_keystring nullable

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.

client_referencestring nullable

Your application reconciliation reference, or null.

idstring required

The session's opaque identifier.

state'queued' | 'running' | 'opening_pull_request' | 'needs_input' | 'completed' | 'failed' | 'cancelling' | 'cancelled' required

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

message_idstring nullable required

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

input_request_idstring nullable

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. To answer, use the input_request_id from Get a coding session's open question.

repository_full_namestring required

The connected repository the session runs in.

branch_idstring nullable required

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

branch_namestring nullable required

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

session_urlstring nullable required

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

error_codestring nullable required

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

outcome'pull_request' | 'answer' nullable

How a completed session ended: pull_request when it opened or updated a pull request, answer when it ended without one and replied instead; has_unpublished_changes says whether that branch still changes files. null until the session completes.

summarystring nullable

The session's final reply in Markdown, up to 10,000 characters: the answer for an answer outcome, the change summary for a pull_request outcome. null until the session publishes.

has_unpublished_changesboolean

true when an answer session's branch changes files that no pull request carries yet: send a message asking for one to have the agent open it. false otherwise.

Example response

{
  "launch_key": "flag-cleanup-123",
  "client_reference": "release-task-123",
  "id": "6820f3a4e7b91d003c45a1f2",
  "state": "running",
  "message_id": "ca00e880-1111-4444-aaaa-ccddeeff0011",
  "input_request_id": "ca00e880-1111-4444-aaaa-ccddeeff0011",
  "repository_full_name": "acme/project",
  "branch_id": "6820f3a4e7b91d003c45a1f3",
  "branch_name": "base-code/fix-login-redirect-45a1f2",
  "session_url": "https://app.base44.com/apps/6820f3a4e7b91d003c45a1f2/editor/preview",
  "pull_request": {
    "number": 123,
    "url": "https://github.com/acme/project/pull/123"
  },
  "error_code": "execution_failed",
  "outcome": "pull_request",
  "summary": "Removed the retired flag and kept the enabled behavior."
}

Changes