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

# Get a hosted enrollment session

> Returns a session's state, its verdict and `terminal_reason` once it ends, your `reference_id`, and when it started and ended. Poll it, or subscribe to the session's webhooks, to learn when the applicant finishes. The embed link is not returned here: keep the `embed_url` from the `POST /onboarding/sessions` response.

This is a hosted enrollment session: the applicant completes your published journey on Baselayer's page. To verify an identity you collected yourself, use a direct verification, `POST /issuance/identities/verifications`.

Onboarding must be enabled for your organization. Until it is, this endpoint answers 403 with error code 37.



## OpenAPI

````yaml /api-reference/openapi.json get /onboarding/sessions/{session_id}
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /onboarding/sessions/{session_id}:
    get:
      tags:
        - Onboarding
      summary: Get a hosted enrollment session
      description: >-
        Returns a session's state, its verdict and `terminal_reason` once it
        ends, your `reference_id`, and when it started and ended. Poll it, or
        subscribe to the session's webhooks, to learn when the applicant
        finishes. The embed link is not returned here: keep the `embed_url` from
        the `POST /onboarding/sessions` response.


        This is a hosted enrollment session: the applicant completes your
        published journey on Baselayer's page. To verify an identity you
        collected yourself, use a direct verification, `POST
        /issuance/identities/verifications`.


        Onboarding must be enabled for your organization. Until it is, this
        endpoint answers 403 with error code 37.
      operationId: get_onboarding_session_onboarding_sessions__session_id__get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.OnboardingSessionReadResponse'
        '403':
          description: >-
            Onboarding is not enabled for the organization (code 37), or the
            credential lacks the onboarding permission this endpoint needs (code
            30).
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/APIError'
                    title: ForbiddenOrganizationNotEnrolled
                    description: >-
                      Forbidden access. The organization is not enrolled in the
                      product this route belongs to.
                    examples:
                      - code: 37
                        message: >-
                          Forbidden access. The organization is not enrolled in
                          the product this route belongs to.
                        metadata: {}
                  - $ref: '#/components/schemas/APIError'
                    title: ForbiddenAccessNoPermission
                    description: >-
                      Forbidden access. The authentication credentials don't
                      have appropriate permissions to access or affect the
                      resource.
                    examples:
                      - code: 30
                        message: >-
                          Forbidden access. The authentication credentials don't
                          have appropriate permissions to access or affect the
                          resource.
                        metadata: {}
                title: >-
                  Response 403 Get Onboarding Session Onboarding Sessions 
                  Session Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.OnboardingSessionReadResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Onboarding session id.
        state:
          $ref: '#/components/schemas/ResumableWorkflowState'
          description: Lifecycle state of the resumable workflow.
        reference_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference Id
          description: Caller-supplied correlation id from session creation.
        verdict:
          anyOf:
            - $ref: '#/components/schemas/OnboardingVerdict'
            - type: 'null'
          description: >-
            The effective verdict: your reviewer's decision when one was made,
            otherwise what the checks concluded; null until the session
            completes.
        terminal_reason:
          anyOf:
            - $ref: '#/components/schemas/v1.IdentitySubmissionTerminalReasonResponse'
            - type: 'null'
          description: >-
            Typed state and detail when the session ended in FAILED; null
            otherwise.
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
          description: When the session was started.
        completed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Completed At
          description: When the session reached a terminal state; null until then.
      type: object
      required:
        - id
        - state
      title: OnboardingSessionReadResponse (v1)
      description: >-
        ``GET /onboarding/sessions/{session_id}``: the session's state, plus its
        outcome

        for a customer. An API key reads it without the fields the public spec

        hides; the applicant's embed reads the state alone.
    APIError:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      type: object
      required:
        - code
        - message
      title: APIError
      description: >-
        APIError is a Pydantic model for standardizing error responses from the
        API.


        This class is used internally by APIException for JSON serialization.

        Users should typically work with APIException directly in exception
        catalogs.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ResumableWorkflowState:
      type: string
      enum:
        - PENDING
        - EXECUTING
        - WAITING
        - COMPLETED
        - FAILED
        - EXPIRED
        - CANCELLED
      title: ResumableWorkflowState
      description: |-
        Lifecycle state of an asynchronous verification workflow, such as an
        identity submission: PENDING, EXECUTING, or WAITING while in flight,
        then a terminal COMPLETED, FAILED, EXPIRED, or CANCELLED.
    OnboardingVerdict:
      description: Normalized onboarding verdict used across provider-specific outputs.
      enum:
        - APPROVED
        - UNDER_REVIEW
        - REJECTED
      title: OnboardingVerdict
      type: string
    v1.IdentitySubmissionTerminalReasonResponse:
      description: Typed explanation for a submission that did not complete.
      properties:
        state:
          $ref: '#/components/schemas/v1.TerminalReasonState'
          description: Terminal workflow state.
        message:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Human-readable detail recorded by the workflow.
          title: Message
      required:
        - state
      title: IdentitySubmissionTerminalReasonResponse (v1)
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    v1.TerminalReasonState:
      description: |-
        The terminal state a ``terminal_reason`` explains: only a failure
        carries one.
      enum:
        - FAILED
      title: TerminalReasonState
      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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