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

# Get Session

> Get session details including documents and results.

## Authentication & Scope

Requires the `sessions-read` ability.

## Request

```http theme={null}
GET /extractions/sessions/770e8400-e29b-41d4-a716-446655440000 HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter   | Type | Required | Description    |
| ----------- | ---- | -------- | -------------- |
| `sessionId` | uuid | Yes      | The session ID |

## Response

`200 OK` – Session with related data.

```json theme={null}
{
  "id": "770e8400-e29b-41d4-a716-446655440000",
  "name": "Q1 2024 Invoices",
  "extraction_template_id": "550e8400-e29b-41d4-a716-446655440000",
  "settings": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "documents": [
    {
      "id": "880e8400-e29b-41d4-a716-446655440000",
      "filename": "invoice_001.pdf",
      "status": "ready",
      "meta": {
        "page_count": 2
      }
    }
  ],
  "results": [
    {
      "id": "990e8400-e29b-41d4-a716-446655440000",
      "status": "completed",
      "title": "Invoice #12345"
    }
  ]
}
```

`404 Not Found` – Session does not exist or you don't have access.


## OpenAPI

````yaml get /extractions/sessions/{sessionId}
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /extractions/sessions/{sessionId}:
    get:
      tags:
        - Extraction Sessions
      summary: Get Session
      description: >-
        Retrieve a single session with documents and results. Requires
        `sessions-read`.
      operationId: getSession
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractionSession'
        '404':
          description: Not Found
components:
  schemas:
    ExtractionSession:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
        extraction_template_id:
          type: string
          format: uuid
        settings:
          type: object
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        documents:
          type: array
          items:
            $ref: '#/components/schemas/Document'
          readOnly: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/ExtractionResult'
          readOnly: true
    Document:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        workspace_id:
          type: integer
        filename:
          type: string
        mime:
          type: string
        size:
          type: integer
          description: File size in bytes
        sha256:
          type: string
          minLength: 64
          maxLength: 64
        status:
          type: string
          enum:
            - uploaded
            - queued
            - parsing
            - parsed
            - processed
            - failed
        source_type:
          type: string
          enum:
            - upload
            - url
            - connector
        source_url:
          type: string
          nullable: true
        parsings:
          type: array
          items:
            $ref: '#/components/schemas/DocumentParsingSummary'
        created_at:
          type: string
          format: date-time
          readOnly: true
    ExtractionResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        extraction_session_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - created
            - parsing_pending
            - processing
            - completed
            - failed
        config_hash:
          type: string
          nullable: true
        document_refs:
          type: array
          items:
            $ref: '#/components/schemas/DocumentRef'
        data:
          type: object
          description: Extracted data matching the template schema
        audit_data:
          type: object
          description: Verification/reasoning traces and run audit payload
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
    DocumentParsingSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        config_hash:
          type: string
        status:
          type: string
          enum:
            - queued
            - processing
            - ready
            - failed
        parser_version:
          type: string
        updated_at:
          type: string
          format: date-time
    DocumentRef:
      type: object
      required:
        - kind
        - documentId
        - workspaceId
      properties:
        kind:
          type: string
          example: documentRef
        documentId:
          type: string
          format: uuid
        workspaceId:
          type: integer
        filename:
          type: string
        mime:
          type: string
        size:
          type: integer
        sha256:
          type: string
        source:
          type: object
          properties:
            type:
              type: string
              enum:
                - upload
                - url
                - connector
            url:
              type: string
              nullable: true
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````