> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get coding session by launch key on an imported app

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

Recover an accepted coding session using the Idempotency-Key you supplied when launching it. This read never starts work and returns not_found if no launch was accepted. The key is bound to your user and this app. Authenticate with the same platform principal as the launch. Shares the read limit of 60 requests per minute per user.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/imported/sessions/launch-requests/{launch_key}
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/imported/sessions/launch-requests/{launch_key}:
    get:
      summary: Get coding session by launch key on an imported app
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Recover an accepted coding session using the Idempotency-Key you
        supplied when launching it. This read never starts work and returns
        not_found if no launch was accepted. The key is bound to your user and
        this app. Authenticate with the same platform principal as the launch.
        Shares the read limit of 60 requests per minute per user.
      operationId: >-
        get_launch_session_api_apps__app_id__imported_sessions_launch_requests__launch_key__get
      parameters:
        - name: launch_key
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            pattern: ^[A-Za-z0-9_.:-]+$
            description: The Idempotency-Key supplied to the launch request.
            examples:
              - flag-cleanup-123
            title: Launch Key
          description: The Idempotency-Key supplied to the launch request.
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            title: App Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: '`unauthenticated`: Missing or invalid credentials.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '403':
          description: '`forbidden`: You don''t have write access to this app or repository.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '404':
          description: '`not_found`: The imported app or session was not found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '409':
          description: >-
            `idempotency_conflict` or `conflict`: The request conflicts with an
            earlier launch or current repository state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '422':
          description: >-
            `invalid_request`: The input or Idempotency-Key is invalid.
            `source_ref_not_found`: `source_ref` isn't a branch in the connected
            repository.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: '`rate_limited`: Retry after the number of seconds in Retry-After.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    SessionResponse:
      properties:
        launch_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Launch Key
          description: >-
            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.
          examples:
            - flag-cleanup-123
        client_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Reference
          description: Your application reconciliation reference, or null.
          examples:
            - release-task-123
        id:
          type: string
          title: Id
          description: The session's opaque identifier.
          examples:
            - 6820f3a4e7b91d003c45a1f2
        created_by_user_id:
          type: string
          title: Created By User Id
          description: >-
            The ID of the user who launched the session. A session launched with
            a workspace API key reports the key's owner.
          examples:
            - 6820f3a4e7b91d003c45a1f4
        state:
          type: string
          enum:
            - queued
            - running
            - opening_pull_request
            - needs_input
            - completed
            - failed
            - cancelling
            - cancelled
          title: State
          description: >-
            The session's state: `queued`, `running`, `opening_pull_request`,
            `needs_input`, `completed`, `failed`, `cancelling`, or `cancelled`.
          examples:
            - running
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Id
          description: >-
            The UUID of the session's user message, or `null` before dispatch.
            Queued processing updates it to the UUID used for the turn.
          examples:
            - ca00e880-1111-4444-aaaa-ccddeeff0011
        input_request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Request Id
          description: >-
            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.
          examples:
            - ca00e880-1111-4444-aaaa-ccddeeff0011
        repository_full_name:
          type: string
          title: Repository Full Name
          description: The connected repository the session runs in.
          examples:
            - acme/project
        branch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch Id
          description: >-
            The session's Base Code branch identifier, or `null` before
            provisioning.
          examples:
            - 6820f3a4e7b91d003c45a1f3
        branch_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch Name
          description: The session's working Git branch, or `null` before provisioning.
          examples:
            - base-code/fix-login-redirect-45a1f2
        session_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Url
          description: >-
            The Base Code editor URL for inspecting the session or answering
            pending questions, or `null` until its branch is provisioned.
          examples:
            - >-
              https://app.base44.com/apps/6820f3a4e7b91d003c45a1f2/editor/preview
        pull_request:
          anyOf:
            - $ref: '#/components/schemas/SessionPullRequest'
            - type: 'null'
          description: The session's pull request, or `null` until one is opened.
          examples:
            - number: 123
              url: https://github.com/acme/project/pull/123
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: The stable failure cause, or `null` if there is no failure.
          examples:
            - execution_failed
        error_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Reason
          description: >-
            A short, human-readable explanation of `error_code` and what to do
            next, or `null` if there is no failure.
          examples:
            - >-
              The branch's sandbox ran out of disk space. Crash dumps were
              removed; send the message again.
        outcome:
          anyOf:
            - type: string
              enum:
                - pull_request
                - answer
            - type: 'null'
          title: Outcome
          description: >-
            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.
          examples:
            - pull_request
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
          description: >-
            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.
          examples:
            - Removed the retired flag and kept the enabled behavior.
        has_unpublished_changes:
          type: boolean
          title: Has Unpublished Changes
          description: >-
            `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.
          default: false
          examples:
            - false
        push_failed:
          type: boolean
          title: Push Failed
          description: >-
            `true` when a `pull_request` session's last changes did not reach
            the pull request's branch on GitHub because the push failed;
            `summary` then starts with a warning that says where the work is.
            `false` otherwise.
          default: false
          examples:
            - false
      type: object
      required:
        - id
        - created_by_user_id
        - state
        - message_id
        - repository_full_name
        - branch_id
        - branch_name
        - session_url
        - pull_request
        - error_code
      title: SessionResponse
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    SessionPullRequest:
      properties:
        number:
          type: integer
          title: Number
          description: The pull request's number in the connected repository.
          examples:
            - 123
        url:
          type: string
          title: Url
          description: The pull request's URL.
          examples:
            - https://github.com/acme/project/pull/123
      type: object
      required:
        - number
        - url
      title: SessionPullRequest
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        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`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.