Blueprints
Blueprints define the structure of your content. Think of a blueprint as a schema — it specifies which fields a resource has, what type of data each field stores, and how the resource behaves.
Blueprint types
| Type | Instances | Editable | Use case |
|---|---|---|---|
| Resource | Multiple | Yes | Blog posts, products, team members |
| Singular resource | One | Yes | Site settings, homepage content, contact info |
| Read-only resource | Multiple | No (via admin) | Form submissions, comments, user feedback |
Resource
The standard type. Create, edit, publish, and delete multiple instances through the admin panel or the API.
Singular resource
Only one instance exists. In the admin panel, it appears as a single form (no list view). The API returns the resource directly instead of a paginated list.
Read-only resource
Instances can be created via the API (e.g. form submissions) but cannot be edited or published through the admin panel. They appear in a read-only list.
Blueprint fields
Each blueprint has an ordered list of fields. Fields define the shape of the attributes object in API responses.
Field types reference
| Type | API key | API value | Example |
|---|---|---|---|
| Text | text | string | "Getting started with Diggama" |
| Rich text | rich-text | string (HTML) | "<p>Hello <strong>world</strong></p>" |
| Slug | slug | string | "getting-started" |
email | string | "[email protected]" | |
| Number | number | number | 42 |
| Money | money | number | 29.99 |
| Boolean | boolean | boolean | true |
| Date | date | string (YYYY-MM-DD) | "2026-02-07" |
| Date and time | datetime | string (ISO 8601) | "2026-02-07T14:30:00" |
| Duration | duration | string | "01:30:00" |
| Image | image | string (URL) | "https://cdn.diggama.com/img/photo.jpg" |
| File | file | string (URL) | "https://cdn.diggama.com/files/doc.pdf" |
| Link | link | string (URL) | "https://example.com" |
| Color | color | string (HEX) | "#8931da" |
| Choice | enum | string | "featured" |
| Multi-choice | multi-enum | array | ["news", "featured"] |
| Reference | reference | string (resource ID) | "gKqv6dx6pBk9" |
| References | references | array (resource IDs) | ["gKqv6dx6pBk9", "xR4mN2v"] |
| User | user | string (user ID) | "kP3nQ8w" |
| Address | address | object | {"street": "1 rue de la Paix", "city": "Paris"} |
Example API response
A blueprint blog-posts with fields: title (Text), slug (Slug), content (Rich text), cover (Image), featured (Boolean), category (Choice), author (Reference).
{
"id": "gKqv6dx6pBk9",
"type": "resource",
"published_at": "2026-02-01T12:00:00+00:00",
"created_at": "2026-01-28T09:15:00+00:00",
"updated_at": "2026-02-01T12:00:00+00:00",
"attributes": {
"title": "Getting started with Diggama",
"slug": "getting-started",
"content": "<p>Welcome to your new headless CMS.</p>",
"cover": "https://cdn.diggama.com/images/cover.jpg",
"featured": true,
"category": "tutorial",
"author": "xR4mN2vBwQy7"
},
"relationships": {
"blueprint": {
"data": { "id": "blog-posts", "type": "blueprint" }
}
}
}Variants
Blueprints can define variants for multilingual content. Each variant stores its own copy of the resource attributes.
When a blueprint has variants, pass the variant query parameter to any API endpoint:
GET /v2/resources/blog-posts?variant=frIf omitted, the blueprint's default variant is used. The API response format stays the same — you get the attributes for the requested variant.