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

# Get Results by ID

Retrieve the results of a previously submitted [content check](/2025-12-01/session/check-session) request. Use this endpoint to look up policy check results using either your own tracking identifier or the system-generated ID.

## Query Parameters

<Warning>You must provide exactly one of the following identifiers: <code>external\_session\_id</code> or <code>internal\_session\_id</code>. Do not pass both.</Warning>

| Parameter             | Required | Description                                                                                                                                                                         |
| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `internal_session_id` | ✓\*      | The system-generated UUID returned in the [content check](/2025-12-01/session/check-session) response. This is always available, even if you didn't provide an external session ID. |
| `external_session_id` | ✓\*      | Your custom tracking identifier that you passed when [checking content](/2025-12-01/session/check-session). Use this if you want to track sessions with your own IDs.               |
| `deployment_id`       |          | Override deployment resolved from API key. Defaults to the deployment associated with your API key.                                                                                 |

\*Exactly one of `internal_session_id` or `external_session_id` is required.

## Example Requests

Using your external session ID:

```bash theme={null}
curl -X GET "https://eu.whitecircle.com/api/session/get_by_id?deployment_id=your-deployment-id&external_session_id=user-session-123" \
  -H "Authorization: Bearer wc-your-api-key" \
  -H "whitecircle-version: 2025-12-01"
```

Using the internal session ID:

```bash theme={null}
curl -X GET "https://eu.whitecircle.com/api/session/get_by_id?deployment_id=your-deployment-id&internal_session_id=123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer wc-your-api-key" \
  -H "whitecircle-version: 2025-12-01"
```

## Response

The endpoint returns a list of check results matching the provided session identifier. Each result includes:

* `flagged` — Whether any policy violations were detected
* `internal_session_id` — The system-generated UUID for the session
* `external_session_id` — Your custom tracking ID (if provided during check)
* `policies` — A map of policy IDs to their status, including whether each policy was violated

<Tip>If you provided an <code>external\_session\_id</code> during the original check, use it here for easier lookups. Otherwise, store the <code>internal\_session\_id</code> from the check response.</Tip>


## OpenAPI

````yaml GET /api/session/get_by_id
openapi: 3.1.0
info:
  title: WhiteCircle API Backend
  description: 'Authentication: Bearer API Key Required'
  license:
    name: ''
  version: '2025-12-01'
servers:
  - url: https://eu.whitecircle.com
  - url: https://us.whitecircle.com
security: []
tags:
  - name: Session
    description: Session-based content checking and moderation
  - name: User
    description: User risk assessment and scoring
  - name: Policy
    description: Policy management CRUD
  - name: Metric
    description: Metric management CRUD
  - name: Artifact
    description: Standalone artifact moderation
paths:
  /api/session/get_by_id:
    get:
      tags:
        - Session
      operationId: get_by_id_v3
      parameters:
        - name: whitecircle-version
          in: header
          description: API Version
          required: true
          schema:
            type: string
          example: '2025-12-01'
        - name: deployment_id
          in: query
          description: Optional deployment ID to validate session ownership
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: external_session_id
          in: query
          description: Find check results by external session ID (your tracking identifier)
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: internal_session_id
          in: query
          description: Find check results by internal session ID (system-generated UUID)
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetByIdResponseV3'
        '400':
          description: Bad Request
      security:
        - bearerAuth: []
components:
  schemas:
    GetByIdResponseV3:
      type: object
      required:
        - list
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/CheckResponseV3'
      example:
        list:
          - flagged: true
            internal_session_id: 123e4567-e89b-12d3-a456-426614174000
            external_session_id: user-session-001
            policies:
              70289e06-9111-463e-b121-7247c2b7bfbd:
                flagged: true
                flagged_source:
                  - text
                name: No PII Sharing
    CheckResponseV3:
      type: object
      required:
        - flagged
        - internal_session_id
        - policies
      properties:
        external_session_id:
          type:
            - string
            - 'null'
        flagged:
          type: boolean
        internal_session_id:
          type: string
        note:
          type:
            - string
            - 'null'
        policies:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/PolicyStatusV3'
          propertyNames:
            type: string
      example:
        flagged: true
        internal_session_id: 123e4567-e89b-12d3-a456-426614174000
        external_session_id: user-session-001
        policies:
          70289e06-9111-463e-b121-7247c2b7bfbd:
            flagged: false
            flagged_source: []
            name: No PII Sharing
          a4a91875-1e54-42d7-b9b0-a75dfebeb057:
            flagged: true
            flagged_source:
              - text
            name: Drugs
    PolicyStatusV3:
      type: object
      required:
        - flagged
        - flagged_source
        - name
      properties:
        flagged:
          type: boolean
        flagged_source:
          type: array
          items:
            $ref: '#/components/schemas/ViolationSource'
        name:
          type: string
    ViolationSource:
      type: string
      enum:
        - text
        - image
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key required. Format: Bearer wc-your-api-key'

````