---
title: "Search blocks"
method: GET
path: "/blocks"
tags: ["Blocks"]
---

# Search blocks

`GET /blocks`

## Request

- Base URL: `https://api5.optimove.net/content/v1`
- URL: `https://api5.optimove.net/content/v1/blocks`
- Auth: API key in header `X-API-KEY`

Returns a page of the tenant's blocks, without their content. Use `GET /blocks/{id}` to get a block's content.

## Query parameters

- `search` string
- `folderId` string, uuid
- `dateFrom` string, date-time
- `dateTo` string, date-time
- `skip` integer
- `take` integer
- `sortOrder` 'date-newest' | 'date-oldest' | 'name-asc' | 'name-desc'

## Response `200`

A page of blocks.

- BlockListPage
  - `items` BlockListItem[], required
    - `id` string, uuid, required
    - `tagName` string, required
    - `name` string, required
    - `folderId` string, uuid, nullable
    - `editorType` 'html' | 'visual', required: Editor the content is built with: - `html`: HTML code editor - `visual`: drag-and-drop editor
    - `templatesUsingCount` integer, required: Number of templates that use the block.
    - `createdAt` string, date-time, required
    - `createdBy` string, required
    - `updatedAt` string, date-time, required
    - `updatedBy` string, required
  - `totalCount` integer, required: Number of blocks that match the search, across all pages.
  - `skip` integer, required
  - `take` integer, required
  - `hasMore` boolean, required: Whether there are more blocks after this page.

## Other responses

- `400`: The request is malformed or fails validation.
- `401`: The `X-API-KEY` header is missing or the API key is not valid.
- `403`: The API key doesn't have the admin role, or the tenant isn't allowed to change this item.
- `429`: The tenant's rate limit is reached. Retry after the time in `x-ratelimit-reset`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/optimove/apis/content-api.md) - [All operations](https://skmtc.dev/optimove/apis/content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/optimove/apis/content-api/revisions/2f4f55f36f0e?raw)
