> ## 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.

# Fetch a Block

Fetch a single block (Detail Block) by its key. Each block in your project has its own slug — defined when the block is created in the API Builder — and a single record key identifies which record to render.

The endpoint accepts both `POST` and `GET` (no body in either case); `POST` is canonical and what the [Client SDK](/reference/client-sdk) uses. The block payload is shaped by your block's field configuration: every field becomes a property on the response, with composite shapes preserved (Price, Media, etc.). Translatable fields resolve to the active locale; scoped fields resolve to the active scope.

## Path Parameters

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

<ParamField path="slug" type="string" required>
  The block's slug, e.g. `<block-slug>`. Per project — see your block's detail view in the API Builder.
</ParamField>

<ParamField path="key" type="string" required>
  The record key to fetch. The block's connected [Data Storage](/data-integration/data-storages) determines which key field is used.
</ParamField>

## Headers

See [Headers](/reference/fetch-api#headers) on the overview for the full set. The block endpoint uses `fs-context`, `fs-domain`, `fs-version`, and `fs-secret` (only when [the project has fetch keys configured](/reference/fetch-api#authentication)).

## Response

Project-specific. Generate the [Client SDK](/reference/client-sdk) for typed access, or read the live shape from the project's [OpenAPI spec](/reference/fetch-api#openapi-spec).

### Status codes

| Code  | When                                                                                |
| ----- | ----------------------------------------------------------------------------------- |
| `200` | Block found and rendered                                                            |
| `401` | `fs-secret` missing or wrong (only when the project has fetch keys configured)      |
| `404` | No record matches the key, or the block slug doesn't exist for the resolved context |
| `403` | Project's plan limit for Fetch API requests exceeded                                |

<ResponseExample>
  ```json 200 OK theme={"theme":"css-variables"}
  {
    "name": "Aurora Snowboard",
    "price": {
      "amount": 49900,
      "currency": "eur",
      "precision": 2
    },
    "image": {
      "src": "https://cdn.demo-shop.com/products/aurora.jpg",
      "altText": "Aurora Snowboard front view"
    },
    "availability": "in-stock"
  }
  ```

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

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