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

# Get Context

Resolve a `contextKey` to the stored region, locale, and scope. Useful for hydrating client state from a cookie, or for verifying a token before making other requests.

## Path Parameters

<ParamField path="project-token" type="string" required>
  Your project's Fetch token, embedded in the subdomain.
</ParamField>

## Headers

<ParamField header="fs-context" type="string" required>
  The `contextKey` to resolve. The token must be 36–50 characters and exist in the project.
</ParamField>

<ParamField header="fs-secret" type="string">
  Required when the project has fetch API keys configured.
</ParamField>

## Response

<ResponseField name="token" type="string" required>
  The active `contextKey`.
</ResponseField>

<ResponseField name="region" type="string" required>
  The region key (e.g. `eu`, `uk`).
</ResponseField>

<ResponseField name="locale" type="string" required>
  The locale key (e.g. `de-DE`, `en-GB`).
</ResponseField>

### Status codes

| Code  | When                                                                           |
| ----- | ------------------------------------------------------------------------------ |
| `200` | Token resolved                                                                 |
| `400` | `INVALID_TOKEN` — `fs-context` not in the 36–50 character range                |
| `401` | `fs-secret` missing or wrong (only when the project has fetch keys configured) |
| `404` | `TOKEN_NOT_FOUND` — token doesn't exist in this project                        |

<RequestExample>
  ```bash curl theme={"theme":"css-variables"}
  curl 'https://fetch-<project-token>.frontic.com/context/token' \
    -H 'fs-context: <context-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"theme":"css-variables"}
  {
    "token": "ae0d4981-c363-4d5a-a49e-1f053d49f2f7",
    "region": "eu",
    "locale": "de-DE"
  }
  ```

  ```json 404 Not Found theme={"theme":"css-variables"}
  {
    "error": "Token not found",
    "code": "TOKEN_NOT_FOUND",
    "details": []
  }
  ```
</ResponseExample>
