> ## 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](https://docs.frontic.com/reference/client-sdk.md) 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

**project-token** `string` *required*

Your project's Fetch token, embedded in the subdomain.

**slug** `string` *required*

The block's slug, e.g. `<block-slug>`. Per project - see your block's detail view in the API Builder.

**key** `string` *required*

The record key to fetch. The block's connected [Data Storage](https://docs.frontic.com/data-integration/data-storages.md) determines which key field is used.

## Headers

See [Headers](https://docs.frontic.com/reference/fetch-api.md#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](https://docs.frontic.com/reference/fetch-api.md#authentication)).

## Response

Project-specific. Generate the [Client SDK](https://docs.frontic.com/reference/client-sdk.md) for typed access, or read the live shape from the project's [OpenAPI spec](https://docs.frontic.com/reference/fetch-api.md#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` | `KEY_NOT_FOUND` or `BLOCK_NOT_EXISTS` - no record matches the key, or the block slug doesn't exist for the resolved context |
| `422` | `FETCH_API_LIMIT_EXCEEDED` - project's plan limit for Fetch API requests exceeded |

```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": [],
  "correlationId": "9f1c2e7a-4b30-4d8e-9a55-2c6f0b7d1e84"
}
```

```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>'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.