Hiro StackerDB API
Endpoints for interacting with StackerDB instances.
Endpoints for interacting with StackerDB instances.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/hiro-stackerdb-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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: Stacks 3.0+ RPC Stacker DB API
version: 1.0.0
description: 'This is the documentation for the `stacks-node` RPC interface.
'
license:
name: CC-0
url: https://creativecommons.org/publicdomain/zero/1.0/
servers:
- url: http://localhost:20443
description: Local Stacks Node
tags:
- name: StackerDB
description: Endpoints for interacting with StackerDB instances.
paths:
/v2/stackerdb/{principal}/{contract_name}/{slot_id}:
get:
summary: Get StackerDB chunk (latest version)
tags:
- StackerDB
security: []
operationId: getStackerDbChunk
description: 'Get the latest version of a chunk of data from a StackerDB instance.
'
parameters:
- $ref: ./components/parameters/standard-principal.yaml
- $ref: ./components/parameters/contract-name.yaml
- name: slot_id
in: path
required: true
description: Slot ID (u32 range)
schema:
type: integer
minimum: 0
maximum: 4294967295
responses:
'200':
description: StackerDB chunk data
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/stackerdb/{principal}/{contract_name}/{slot_id}/{slot_version}:
get:
summary: Get StackerDB chunk (specific version)
tags:
- StackerDB
security: []
operationId: getStackerDbChunkVersioned
description: 'Get a specific version of a chunk of data from a StackerDB instance.
'
parameters:
- $ref: ./components/parameters/standard-principal.yaml
- $ref: ./components/parameters/contract-name.yaml
- name: slot_id
in: path
required: true
description: Slot ID (u32 range)
schema:
type: integer
minimum: 0
maximum: 4294967295
- name: slot_version
in: path
required: true
description: Specific slot version (u32 range)
schema:
type: integer
minimum: 0
maximum: 4294967295
responses:
'200':
description: StackerDB chunk data
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/stackerdb/{principal}/{contract_name}:
get:
summary: Get StackerDB metadata
tags:
- StackerDB
security: []
operationId: getStackerDbMetadata
description: 'Get metadata about a StackerDB instance, including slot information.
'
parameters:
- $ref: ./components/parameters/standard-principal.yaml
- $ref: ./components/parameters/contract-name.yaml
responses:
'200':
description: StackerDB metadata
content:
application/json:
schema:
$ref: '#/components/schemas/StackerDbMetadata'
examples:
stackerdb-metadata:
summary: StackerDB metadata response
value:
- slot_id: 0
slot_version: 1
data_hash: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
signature: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/stackerdb/{principal}/{contract_name}/chunks:
post:
summary: Write StackerDB chunk
tags:
- StackerDB
security: []
operationId: postStackerDbChunk
description: 'Write a chunk of data to a StackerDB instance.
The request body should contain a JSON object with the chunk data including
slot_id, slot_version, signature, and hex-encoded data.
The response indicates whether the chunk was accepted, and if not, provides
detailed error information. Note that failed writes return HTTP 200 with
accepted: false, not HTTP error codes.
'
parameters:
- $ref: ./components/parameters/standard-principal.yaml
- $ref: ./components/parameters/contract-name.yaml
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StackerDbChunkData'
examples:
stackerdb-chunk-request:
summary: StackerDB chunk data request
value:
slot_id: 1
slot_version: 2
sig: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01
data: deadbeefcafebabe
responses:
'200':
description: Chunk submission result (both success and failure cases)
content:
application/json:
schema:
$ref: '#/components/schemas/StackerDbChunkAckData'
examples:
success:
$ref: ./components/examples/stackerdb-chunk-ack-success.example.json
failure:
$ref: ./components/examples/stackerdb-chunk-ack-failure.example.json
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/v2/stackerdb/{principal}/{contract_name}/replicas:
get:
summary: List StackerDB replicas
tags:
- StackerDB
security: []
operationId: listStackerDbReplicas
description: 'Get a list of replicas for a StackerDB instance.
'
parameters:
- $ref: ./components/parameters/standard-principal.yaml
- $ref: ./components/parameters/contract-name.yaml
responses:
'200':
description: List of StackerDB replicas
content:
application/json:
schema:
$ref: '#/components/schemas/StackerDbReplicas'
examples:
stackerdb-replicas:
summary: List of StackerDB replicas
value:
- ip: 127.0.0.1
port: 20444
public_key_hash: 03abc123...
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
components:
schemas:
StackerDbMetadata:
$ref: ./components/schemas/stackerdb-metadata.schema.yaml
StackerDbReplicas:
$ref: ./components/schemas/stackerdb-replicas.schema.yaml
StackerDbChunkAckData:
$ref: ./components/schemas/stackerdb-chunk-ack-data.schema.yaml
StackerDbChunkData:
$ref: ./components/schemas/stackerdb-chunk-data.schema.yaml
responses:
NotFound:
description: Not found
content:
text/plain:
schema:
type: string
example: Not found
InternalServerError:
description: Internal Server Error
content:
text/plain:
schema:
type: string
example: Internal Server Error
BadRequest:
description: Bad request
content:
text/plain:
schema:
type: string
example: Bad request
securitySchemes:
rpcAuth:
type: apiKey
in: header
name: authorization
description: 'Plain-text secret value that must exactly equal the node''s
configured password, which is set as `connection_options.auth_token`
in the node''s configuration file.
'