# List data blocks (latest version of each)

GET

/v1/blocks

```sh
curl --request GET \
  --url 'https://example.com/v1/blocks?limit=25&kind=prompt&scopeKind=tenant' \
  --header 'Authorization: Bearer <token>'
```

Cursor-paginated. Only the blocks of projects the caller can read. `?kind=` narrows to prompts or settings, `?name=` is a prefix match on the id, and `?scopeKind=` + `?scopeId=` narrow to a project or an org, as the other lists do.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.1.10/reference/api.md#bearerauth)**

## Parameters

### Query Parameters

**limit**

integer

default: 25 >= 1 <= 100

1..100. Default 25.

**cursor**

string

Where the previous page ended: its `nextCursor`, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise `400 bad-input`, and the list starts again without it. Absent → first page.

**kind**

`prompt`: a Liquid template an agent renders as its instructions. `settings`: a JSON object tools and templates read.

string

Allowed values: prompt settings

Only blocks of this kind: `prompt` or `settings`.

**name**

string

Prefix match on the block id.

**scopeKind**

Discriminator for the ?scopeKind + ?scopeId + ?inherit triplet. Tenant carries no id (implicit from session); org/project require scopeId.

string

Allowed values: tenant org project

Optional scope discriminator. If absent, no scope filter is applied.

**scopeId**

string

\>= 1 characters

Required IF scopeKind is `org` or `project`. MUST be absent if scopeKind=`tenant` (tenant is implicit from the session). Malformed combinations return 400 scope-invalid.

## Responses

### 200

Page of blocks.

application/json

object

**data**

required

Array\<object>

A data block version: a prompt or settings, versioned like a tool (immutable versions, soft unregister). An agent version pins the block versions it uses when it is published. Belongs to one project and is authorized through it.

object

**id**

required

Dotted lowercase id (e.g. `acme.intake-prompt`).

string

**version**

required

string

/^\d+\\.\d+\\.\d+$/

**kind**

required

`prompt`: a Liquid template an agent renders as its instructions. `settings`: a JSON object tools and templates read.

string

Allowed values: prompt settings

**description**

string

**content**

required

One of:

- **object**

  object

  **template**

  required

  Liquid, rendered as an agent’s instructions are (same parameters and auto-injected variables).

  string

  \>= 1 characters

  **parameters**

  Array\<object>

  object

  **name**

  required

  string

  **description**

  string

  **type**

  required

  string

  Allowed values: string number boolean date

  **required**

  boolean

  **default**

  Default value used when the caller omits this parameter.

- **object**

  object

  **values**

  required

  What tools read (`ToolContext.settings[<block id>]`) and templates read (`settings.<block id>.<key>`).

  object

  **_key_**

  additional properties

  any

  **schema**

  JSON Schema (draft 2020-12) the values must satisfy. A later version’s values must satisfy the latest version’s schema too.

  object

  **_key_**

  additional properties

  any

**projectId**

required

string format: uuid

**publishedAt**

required

string format: date-time

**unregisteredAt**

Present only on an unregistered version; agent versions that pin it still read it.

string format: date-time

**nextCursor**

string

**hasMore**

required

boolean

##### Example

```json
{
  "data": [
    {
      "kind": "prompt",
      "content": {
        "parameters": [
          {
            "type": "string"
          }
        ]
      }
    }
  ]
}
```

### 400

Malformed query parameter: an unknown `kind`, or `scope-invalid` for a malformed scope.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`POST /v1/blocks`: Publish a data block version](https://docs.kindgi.com/v0.1.10/reference/api/operations/blockspublish.md)
- [Error code `scope-invalid`](https://docs.kindgi.com/v0.1.10/reference/errors.md#scope-invalid)
- [Every error code](https://docs.kindgi.com/v0.1.10/reference/errors.md)
