Appearance
Blueprints API
Read the structure of your project's content types: which blueprints exist, what fields they hold, and what shape their values take.
Useful for generating types, validating payloads before you send them, or building tooling that adapts to a project it has not seen before.
List blueprints
GET /v2/blueprintsReturns the blueprints your token can read: those on which it holds view or preview. Others are omitted: a token scoped to blog-posts sees only blog-posts.
json
{
"data": [
{
"id": "blog-posts",
"type": "blueprint",
"attributes": {
"name": "Blog post",
"slug": "blog-posts",
"kind": "resource",
"is_readonly": false,
"is_singular": false,
"record_title": "title",
"variants": ["en", "fr"],
"default_variant": "en",
"fields_count": 6,
"resources_count": 42
}
}
],
"meta": { "total": 1 }
}| Attribute | Description |
|---|---|
kind | resource, singular_resource or readonly_resource (see Blueprints) |
record_title | The field used as the record's display title; absent when none is set |
variants | Variant slugs; absent when the type is not multilingual |
default_variant | Variant used when a request has no variant parameter; absent when none is set |
resources_count | Number of resources, drafts included |
Get one blueprint
GET /v2/blueprints/{blueprint}Adds the field list and a JSON Schema for the type's attributes object.
In fields, required is true when the field's validation rules include required. description and metadata are omitted when not set.
json
{
"data": {
"id": "blog-posts",
"type": "blueprint",
"attributes": { "…": "as above" },
"fields": [
{ "slug": "title", "name": "Title", "type": "text", "required": true },
{ "slug": "category", "name": "Category", "type": "enum", "required": false,
"metadata": { "options": ["news", "tutorial"] } }
],
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": { "type": "string", "title": "Title" },
"category": { "type": "string", "enum": ["news", "tutorial"], "title": "Category" }
}
}
}
}The schema mirrors the field types reference: number and money become number, date carries format: "date", a Choice field becomes an enum, and reference fields describe which type they point at.
Required fields are enforced by the Resources API: a create or PUT that omits one fails with 422 VALIDATION_ERROR. PATCH never requires a field.
Permissions
Both endpoints need view or preview on the blueprint. A token that can read a type's resources can read its schema; one that cannot doesn't see the blueprint in the list and gets 403 on a direct fetch.
| Status | Code | Cause |
|---|---|---|
403 | FORBIDDEN | The token holds neither view nor preview on that blueprint |
404 | RESOURCE_NOT_FOUND | No such blueprint in this project |