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

# List Blocks

`GET /v1/blocks/`

## Query parameters

- `label` string, nullable — Labels to include (e.g. human, persona)
- `templates_only` boolean — Whether to include only templates
- `name` string, nullable — Name of the block
- `identity_id` string, nullable — Search agents by identifier id
- `identifier_keys` string[], nullable — Search agents by identifier keys
- `project_id` string, nullable — Search blocks by project id
- `limit` integer, nullable — Number of blocks to return
- `before` string, nullable — Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order
- `after` string, nullable — Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order
- `order` 'asc' | 'desc' — Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for newest first
- `order_by` 'created_at' — Field to sort by
- `label_search` string, nullable — Search blocks by label. If provided, returns blocks that match this label. This is a full-text search on labels.
- `description_search` string, nullable — Search blocks by description. If provided, returns blocks that match this description. This is a full-text search on block descriptions.
- `value_search` string, nullable — Search blocks by value. If provided, returns blocks that match this value.
- `connected_to_agents_count_gt` integer, nullable — Filter blocks by the number of connected agents. If provided, returns blocks that have more than this number of connected agents.
- `connected_to_agents_count_lt` integer, nullable — Filter blocks by the number of connected agents. If provided, returns blocks that have less than this number of connected agents.
- `connected_to_agents_count_eq` integer[], nullable — Filter blocks by the exact number of connected agents. If provided, returns blocks that have exactly this number of connected agents.

## Response `200`

Successful Response

- Block[]
  - `value` string, required — Value of the block.
  - `limit` integer — Character limit of the block.
  - `project_id` string, nullable — The associated project id.
  - `name` string, nullable — The id of the template.
  - `is_template` boolean — Whether the block is a template (e.g. saved human/persona options).
  - `base_template_id` string, nullable — The base template id of the block.
  - `deployment_id` string, nullable — The id of the deployment.
  - `entity_id` string, nullable — The id of the entity within the template.
  - `preserve_on_migration` boolean, nullable — Preserve the block on template migration.
  - `label` string, nullable — Label of the block (e.g. 'human', 'persona') in the context window.
  - `read_only` boolean — Whether the agent has read-only access to the block.
  - `description` string, nullable — Description of the block.
  - `metadata` object, nullable — Metadata of the block.
  - `hidden` boolean, nullable — If set to True, the block will be hidden.
  - `id` string — The human-friendly ID of the Block
  - `created_by_id` string, nullable — The id of the user that made this Block.
  - `last_updated_by_id` string, nullable — The id of the user that last updated this Block.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/yu-code666/apis/letta-api.md) · [All operations](https://skmtc.net/yu-code666/apis/letta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yu-code666/letta-api/versions/6cec99480c13/schema)
