Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/letta-blocks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Letta Admin Blocks API
version: 1.0.0
description: REST API for Letta, the stateful agents platform. Manage agents, memory blocks, archival passages, sources, custom tools, MCP servers, multi-agent groups, runs, and streaming responses. Available as Letta Cloud (managed) at https://api.letta.com/v1 and as the self-hosted open-source server (Apache-2.0) typically run at http://localhost:8283.
contact:
name: Letta
url: https://www.letta.com/
email: support@letta.com
license:
name: Apache-2.0
url: https://github.com/letta-ai/letta/blob/main/LICENSE
x-logo:
url: https://www.letta.com/favicon.ico
servers:
- url: https://api.letta.com
description: Letta Cloud (managed)
- url: https://app.letta.com
description: Letta Cloud (app)
- url: http://localhost:8283
description: Self-hosted Letta server
security:
- bearerAuth: []
tags:
- name: Blocks
description: Manage in-context memory blocks (core memory) shared across agents.
paths:
/v1/blocks/:
get:
tags:
- Blocks
summary: List Blocks
operationId: list_blocks
parameters:
- name: label
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 50
pattern: ^[a-zA-Z0-9_/-]+$
- type: 'null'
description: Label to include (alphanumeric, hyphens, underscores, forward slashes)
examples:
- human
- persona
- the_label_of-a-block
- the_label_of-a-block/with-forward-slash
title: Label
description: Label to include (alphanumeric, hyphens, underscores, forward slashes)
- name: templates_only
in: query
required: false
schema:
type: boolean
description: Whether to include only templates
default: false
title: Templates Only
description: Whether to include only templates
- name: name
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 _-]+$
- type: 'null'
description: Name filter (alphanumeric, spaces, hyphens, underscores)
examples:
- My Agent
- test_tool
- default-config
title: Name
description: Name filter (alphanumeric, spaces, hyphens, underscores)
- name: identity_id
in: query
required: false
schema:
anyOf:
- type: string
minLength: 45
maxLength: 45
pattern: ^identity-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
- type: 'null'
description: The ID of the identity in the format 'identity-<uuid4>'
examples:
- identity-123e4567-e89b-42d3-8456-426614174000
title: Identity Id
description: The ID of the identity in the format 'identity-<uuid4>'
- name: identifier_keys
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: Search agents by identifier keys
title: Identifier Keys
description: Search agents by identifier keys
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Search blocks by project id
title: Project Id
description: Search blocks by project id
- name: tags
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: List of tags to filter blocks by
title: Tags
description: List of tags to filter blocks by
- name: match_all_tags
in: query
required: false
schema:
type: boolean
description: If True, only returns blocks that match ALL given tags. Otherwise, return blocks that have ANY of the passed-in tags.
default: false
title: Match All Tags
description: If True, only returns blocks that match ALL given tags. Otherwise, return blocks that have ANY of the passed-in tags.
- name: limit
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Number of blocks to return
default: 50
title: Limit
description: Number of blocks to return
- name: before
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order
title: Before
description: Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order
- name: after
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order
title: After
description: Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order
- name: order
in: query
required: false
schema:
enum:
- asc
- desc
type: string
description: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for newest first
default: asc
title: Order
description: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for newest first
- name: order_by
in: query
required: false
schema:
const: created_at
type: string
description: Field to sort by
default: created_at
title: Order By
description: Field to sort by
- name: label_search
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 50
pattern: ^[a-zA-Z0-9_/-]+$
- type: 'null'
description: Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels.
examples:
- human
- persona
- the_label_of-a-block
- the_label_of-a-block/with-forward-slash
title: Label Search
description: Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels.
- name: description_search
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 200
- type: 'null'
description: Search blocks by description. If provided, returns blocks whose description matches the search query. This is a full-text search on block descriptions.
title: Description Search
description: Search blocks by description. If provided, returns blocks whose description matches the search query. This is a full-text search on block descriptions.
- name: value_search
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 200
- type: 'null'
description: Search blocks by value. If provided, returns blocks whose value matches the search query. This is a full-text search on block values.
title: Value Search
description: Search blocks by value. If provided, returns blocks whose value matches the search query. This is a full-text search on block values.
- name: connected_to_agents_count_gt
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Filter blocks by the number of connected agents. If provided, returns blocks that have more than this number of connected agents.
title: Connected To Agents Count Gt
description: Filter blocks by the number of connected agents. If provided, returns blocks that have more than this number of connected agents.
- name: connected_to_agents_count_lt
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Filter blocks by the number of connected agents. If provided, returns blocks that have less than this number of connected agents.
title: Connected To Agents Count Lt
description: Filter blocks by the number of connected agents. If provided, returns blocks that have less than this number of connected agents.
- name: connected_to_agents_count_eq
in: query
required: false
schema:
anyOf:
- type: array
items:
type: integer
- type: 'null'
description: Filter blocks by the exact number of connected agents. If provided, returns blocks that have exactly this number of connected agents.
title: Connected To Agents Count Eq
description: Filter blocks by the exact number of connected agents. If provided, returns blocks that have exactly this number of connected agents.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BlockResponse'
title: Response List Blocks
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Blocks
summary: Create Block
operationId: create_block
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateBlock'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BlockResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/blocks/count:
get:
tags:
- Blocks
summary: Count Blocks
description: 'Count all blocks with optional filtering.
Supports the same filters as list_blocks for consistent querying.'
operationId: count_blocks
parameters:
- name: label
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 50
pattern: ^[a-zA-Z0-9_/-]+$
- type: 'null'
description: Label to include (alphanumeric, hyphens, underscores, forward slashes)
examples:
- human
- persona
- the_label_of-a-block
- the_label_of-a-block/with-forward-slash
title: Label
description: Label to include (alphanumeric, hyphens, underscores, forward slashes)
- name: templates_only
in: query
required: false
schema:
type: boolean
description: Whether to include only templates
default: false
title: Templates Only
description: Whether to include only templates
- name: name
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 _-]+$
- type: 'null'
description: Name filter (alphanumeric, spaces, hyphens, underscores)
examples:
- My Agent
- test_tool
- default-config
title: Name
description: Name filter (alphanumeric, spaces, hyphens, underscores)
- name: tags
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: List of tags to filter blocks by
title: Tags
description: List of tags to filter blocks by
- name: match_all_tags
in: query
required: false
schema:
type: boolean
description: If True, only counts blocks that match ALL given tags. Otherwise, counts blocks that have ANY of the passed-in tags.
default: false
title: Match All Tags
description: If True, only counts blocks that match ALL given tags. Otherwise, counts blocks that have ANY of the passed-in tags.
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Search blocks by project id
title: Project Id
description: Search blocks by project id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: integer
title: Response Count Blocks
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/blocks/{block_id}:
patch:
tags:
- Blocks
summary: Modify Block
operationId: modify_block
parameters:
- name: block_id
in: path
required: true
schema:
type: string
minLength: 42
maxLength: 42
pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: The ID of the block in the format 'block-<uuid4>'
examples:
- block-123e4567-e89b-42d3-8456-426614174000
title: Block Id
description: The ID of the block in the format 'block-<uuid4>'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BlockUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BlockResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Blocks
summary: Delete Block
operationId: delete_block
parameters:
- name: block_id
in: path
required: true
schema:
type: string
minLength: 42
maxLength: 42
pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: The ID of the block in the format 'block-<uuid4>'
examples:
- block-123e4567-e89b-42d3-8456-426614174000
title: Block Id
description: The ID of the block in the format 'block-<uuid4>'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Blocks
summary: Retrieve Block
operationId: retrieve_block
parameters:
- name: block_id
in: path
required: true
schema:
type: string
minLength: 42
maxLength: 42
pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: The ID of the block in the format 'block-<uuid4>'
examples:
- block-123e4567-e89b-42d3-8456-426614174000
title: Block Id
description: The ID of the block in the format 'block-<uuid4>'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BlockResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/blocks/{block_id}/agents:
get:
tags:
- Blocks
summary: List Agents for Block
description: 'Retrieves all agents associated with the specified block.
Raises a 404 if the block does not exist.'
operationId: list_agents_for_block
parameters:
- name: block_id
in: path
required: true
schema:
type: string
minLength: 42
maxLength: 42
pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: The ID of the block in the format 'block-<uuid4>'
examples:
- block-123e4567-e89b-42d3-8456-426614174000
title: Block Id
description: The ID of the block in the format 'block-<uuid4>'
- name: before
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Agent ID cursor for pagination. Returns agents that come before this agent ID in the specified sort order
title: Before
description: Agent ID cursor for pagination. Returns agents that come before this agent ID in the specified sort order
- name: after
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Agent ID cursor for pagination. Returns agents that come after this agent ID in the specified sort order
title: After
description: Agent ID cursor for pagination. Returns agents that come after this agent ID in the specified sort order
- name: limit
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Maximum number of agents to return
default: 50
title: Limit
description: Maximum number of agents to return
- name: order
in: query
required: false
schema:
enum:
- asc
- desc
type: string
description: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first
default: desc
title: Order
description: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first
- name: order_by
in: query
required: false
schema:
const: created_at
type: string
description: Field to sort by
default: created_at
title: Order By
description: Field to sort by
- name: include_relationships
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include in the response. If not provided, all relationships are loaded by default. Using this can optimize performance by reducing unnecessary joins.This is a legacy parameter, and no longer supported after 1.0.0 SDK versions.
deprecated: true
title: Include Relationships
description: Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include in the response. If not provided, all relationships are loaded by default. Using this can optimize performance by reducing unnecessary joins.This is a legacy parameter, and no longer supported after 1.0.0 SDK versions.
deprecated: true
- name: include
in: query
required: false
schema:
type: array
items:
enum:
- agent.blocks
- agent.identities
- agent.managed_group
- agent.pending_approval
- agent.secrets
- agent.sources
- agent.tags
- agent.tools
type: string
description: Specify which relational fields to include in the response. No relationships are included by default.
default: []
title: Include
description: Specify which relational fields to include in the response. No relationships are included by default.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AgentState'
title: Response List Agents For Block
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/blocks/{block_id}/identities/attach/{identity_id}:
patch:
tags:
- Blocks
summary: Attach Identity to Block
description: Attach an identity to a block.
operationId: attach_identity_to_block
parameters:
- name: identity_id
in: path
required: true
schema:
type: string
title: Identity Id
- name: block_id
in: path
required: true
schema:
type: string
minLength: 42
maxLength: 42
pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: The ID of the block in the format 'block-<uuid4>'
examples:
- block-123e4567-e89b-42d3-8456-426614174000
title: Block Id
description: The ID of the block in the format 'block-<uuid4>'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BlockResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/blocks/{block_id}/identities/detach/{identity_id}:
patch:
tags:
- Blocks
summary: Detach Identity from Block
description: Detach an identity from a block.
operationId: detach_identity_from_block
parameters:
- name: identity_id
in: path
required: true
schema:
type: string
title: Identity Id
- name: block_id
in: path
required: true
schema:
type: string
minLength: 42
maxLength: 42
pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
description: The ID of the block in the format 'block-<uuid4>'
examples:
- block-123e4567-e89b-42d3-8456-426614174000
title: Block Id
description: The ID of the block in the format 'block-<uuid4>'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BlockResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ZAIThinking:
properties:
type:
type: string
enum:
- enabled
- disabled
title: Type
description: Whether thinking is enabled or disabled.
default: enabled
clear_thinking:
type: boolean
title: Clear Thinking
description: If False, preserved thinking is used (recommended for agents).
default: false
type: object
title: ZAIThinking
description: Thinking configuration for ZAI GLM-4.5+ models.
FileBlock:
properties:
value:
type: string
title: Value
description: Value of the block.
limit:
type: integer
title: Limit
description: Character limit of the block.
default: 100000
project_id:
anyOf:
- type: string
- type: 'null'
title: Project Id
description: The associated project id.
template_name:
anyOf:
- type: string
- type: 'null'
title: Template Name
description: Name of the block if it is a template.
is_template:
type: boolean
title: Is Template
description: Whether the block is a template (e.g. saved human/persona options).
default: false
template_id:
anyOf:
- type: string
- type: 'null'
title: Template Id
description: The id of the template.
base_template_id:
anyOf:
- type: string
- type: 'null'
title: Base Template Id
description: The base template id of the block.
deployment_id:
anyOf:
- type: string
- type: 'null'
title: Deployment Id
description: The id of the deployment.
entity_id:
anyOf:
- type: string
- type: 'null'
title: Entity Id
description: The id of the entity within the template.
preserve_on_migration:
anyOf:
- type: boolean
- type: 'null'
title: Preserve On Migration
description: Preserve the block on template migration.
default: false
label:
anyOf:
- type: string
- type: 'null'
title: Label
description: Label of the block (e.g. 'human', 'persona') in the context window.
read_only:
type: boolean
title: Read Only
description: Whether the agent has read-only access to the block.
default: false
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Description of the block.
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
description: Metadata of the block.
default: {}
hidden:
anyOf:
- type: boolean
- type: 'null'
title: Hidden
description: If set to True, the block will be hidden.
id:
type: string
pattern: ^block-[a-fA-F0-9]{8}
title: Id
description: The human-friendly ID of the Block
examples:
- block-123e4567-e89b-12d3-a456-426614174000
created_by_id:
anyOf:
- type: string
- type: 'null'
title: Created By Id
description: The id of the user that made this Block.
last_updated_by_id:
anyOf:
- type: string
- type: 'null'
title: Last Updated By Id
description: The id of the user that last updated this Block.
tags:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Tags
description: The tags associated with the block.
default: []
file_id:
type: string
title: File Id
description: Unique identifier of the file.
source_id:
type: string
title: Source Id
description: 'Deprecated: Use `folder_id` field instead. Unique identifier of the source.'
deprecated: true
is_open:
type: boolean
title: Is Open
description: True if the agent currently has the file open.
last_accessed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Last Accessed At
description: UTC timestamp of the agent’s most recent access to this file. Any operations from the open, close, or search tools will update this field.
type: object
required:
- value
- file_id
- source_id
- is_open
title: FileBlock
AgentState:
properties:
created_by_id:
anyOf:
- type: string
- type: 'null'
title: Created By Id
description: The id of the user that made this object.
last_updated_by_id:
anyOf:
- type: string
- type: 'null'
title: Last Updated By Id
description: The id of the user that made this object.
created_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Created At
description: The timestamp when the object was created.
updated_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Updated At
description: The timestamp when the object was last updated.
id:
type: string
title: Id
description: The id of the agent. Assigned by the database.
name:
type: string
title: Name
description: The name of the agent.
tool_rules:
anyOf:
- items:
oneOf:
- $ref: '#/components/schemas/ChildToolRule'
- $ref: '#/components/schemas/InitToolRule'
- $ref: '#/components/schemas/TerminalToolRule'
- $ref: '#/components/schemas/ConditionalToolRule'
- $ref: '#/components/schemas/ContinueToolRule'
- $ref: '#/components/schemas/RequiredBeforeExitToolRule'
- $ref: '#/components/schemas/MaxCountPerStepToolRule'
- $ref: '#/components/schemas/ParentToolRule'
- $ref: '#/components/schemas/RequiresApprovalToolRule'
discriminator:
propertyName: type
mapping:
conditional: '#/components/schemas/ConditionalToolRule'
constrain_child_tools: '#/components/schemas/ChildToolRule'
continue_loop: '#/components/schemas/ContinueToolRule'
exit_loop: '#/components/schemas/TerminalToolRule'
max_count_per_step: '#/components/schemas/MaxCountPerStepToolRule'
parent_last_tool: '#/components/schemas/ParentToolRule'
required_before_exit: '#/components/schemas/RequiredBeforeExitToolRule'
requires_approval: '#/components/schemas/RequiresApprovalToolRule'
run_first: '#/components/schemas/InitToolRule'
type: array
- type: 'null'
title: Tool Rules
description: The list of tool rules.
message_ids:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Message Ids
description: The ids of the messages in the agent's in-context memory.
system:
type: string
title: System
description: The system prompt used by the agent.
agent_type:
$ref: '#/components/schemas/AgentType'
description: The type of agent.
llm_config:
$ref: '#/components/schemas/LLMConfig'
description: 'Deprecated: Use `model` field instead. The LLM configuration used by the agent.'
deprecated: true
embedding_config
# --- truncated at 32 KB (127 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/openapi/letta-blocks-api-openapi.yml