# Get Session by ID

`GET /api/protect/get_by_id`

Base URLs: `https://eu.whitecircle.com`, `https://us.whitecircle.com`

OpenAPI: [2025-06-15/openapi.json](https://whitecircle.com/docs/2025-06-15/openapi.json)

Retrieve the results of a previously submitted content check request.

## Required Parameters

| Parameter       | Description                                                   |
| --------------- | ------------------------------------------------------------- |
| `deployment_id` | Specific deployment ID used for the check. See Deployments.  |

## Authorizations

- `Authorization` (`string`, header, required): API Key required. Format: Bearer wc-your-api-key.

## Headers

- `whitecircle-version` (`string`, required): API Version. Example: `"2025-06-15"`.

## Query Parameters

- `deployment_id` (`string`, required): Specific deployment ID used for the check. See Deployments.
- `include_policy_names` (`boolean | null`, optional): Whether to include human-readable policy names in the response (default: false).
- `external_id` (`string | null`, optional): Find check results by external ID (your tracking identifier).
- `internal_id` (`string | null`, optional): Find check results by internal ID (system-generated UUID).

## Request example

```bash
curl --request GET \
  --url 'https://eu.whitecircle.com/api/protect/get_by_id?deployment_id=<deployment_id>&external_id=<external_id>' \
  --header "Authorization: Bearer $WHITECIRCLE_API_KEY" \
  --header 'whitecircle-version: 2025-06-15'
```

## Response

### 200

Success

`application/json`

- `list` (`object[]`, required): List of check results matching the query.
- `list.internal_id` (`string`, required): Unique internal identifier for this check.
- `list.violation` (`boolean`, required): Whether any policy violations were detected.
- `list.violations` (`object`, required): Map of policy IDs to policy status objects containing violation and optional name.
- `list.violations.{key}` (`object`, optional)
- `list.violations.{key}.violation` (`boolean`, required): Whether a violation was detected for this policy.
- `list.violations.{key}.violation_source` (`enum<string>[]`, required): Sources where violations were detected (includes only triggered violations). Available options: `text`, `image`.
- `list.violations.{key}.name` (`string | null`, optional): Human-readable policy name (only present if include_policy_names=true).
- `list.external_id` (`string | null`, optional): Optional external identifier provided by client.

**Example**

```json
{
  "list": [
    {
      "external_id": "user-session-001",
      "internal_id": "123e4567-e89b-12d3-a456-426614174000",
      "violation": true,
      "violations": {
        "70289e06-9111-463e-b121-7247c2b7bfbd": {
          "name": "No PII Sharing",
          "violation": true
        },
        "a4a91875-1e54-42d7-b9b0-a75dfebeb057": {
          "name": "Drugs",
          "violation": false
        }
      }
    }
  ]
}
```

### 400

Bad Request
