Skip to content

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.

Creating a blueprint ​

In the dashboard, open Configuration › Blueprints and click New blueprint. Pick a Type, a Name and a Slug. The slug is the blueprint's identifier in the API (/v2/resources/{slug}). You can declare variants right away or later.

Once created, the blueprint opens on its fields. Click Add field, pick a type from the grid (grouped as Content, Media, Choices, Numbers & time, Relations and Other, with a search box), then give it a name.

Blueprint types ​

TypeAPI keyInstancesEditable in the dashboardUse case
ResourceresourceMultipleYesBlog posts, products, team members
Singular resourcesingular_resourceOneYesSite settings, homepage content, contact info
Read-only resourcereadonly_resourceMultipleNoForm submissions, comments, user feedback

Resource ​

The standard type. Create, edit, publish, and delete multiple instances from the dashboard or the API.

Singular resource ​

Only one instance exists, created automatically: open it from the blueprint's list and edit it. It is always served and cannot be deleted. See Editing content. The V2 list endpoint returns it as a one-item list: read data[0]. The blueprints API flags it with is_singular: true.

Read-only resource ​

Instances are created through the API (e.g. form submissions) and appear in a read-only list in the dashboard: they cannot be edited or published there. The blueprints API flags them with is_readonly: true.

Blueprint settings ​

The Settings of a blueprint hold:

  • Name and Icon: how the blueprint appears in the sidebar.
  • Record title: the field used to label a resource everywhere else in the dashboard, such as relation pickers. Exposed as record_title in the blueprints API.
  • Variants: see Variants.
  • SEO scoring: scores resources of this blueprint against basic SEO checks while editors write. When enabled, choose the content, focus keyword, title, description and slug fields the checks read. See Editing content.

Blueprint fields ​

Each blueprint has an ordered list of fields. Fields define the shape of the attributes object in API responses.

Every field has a Name, a Slug generated from the name (the key under which the value is stored and served, which cannot be changed after creation), an optional Description shown to editors under the input, and a Required checkbox. Some types have extra settings:

TypeSettings
Choice, Multi-choiceAllowed values
MoneyDefault currency, allowed currencies (35 currencies available)
DurationUnit (minutes, hours or days), display format, minimum, maximum
Relation (single / multiple)Related blueprint, fields displayed in the picker
UserRestrict to project members with a given role
Page builderAllowed blocks, starting template (see Page builder)

Field types reference ​

TypeAPI keyAPI valueExample
Texttextstring"Getting started with Diggama"
Rich textrich-textstring (HTML)"<p>Hello <strong>world</strong></p>"
Page builderhtml-pageobject{"html": "<section>…</section>", "css": "…", "blocks": [...]} (see Page builder)
Slugslugstring"getting-started"
Emailemailstring"[email protected]"
Linklinkstring (URL)"https://example.com"
Imageimagestring (URL)"https://cdn.diggama.com/img/photo.jpg"
Filefilestring (URL)"https://cdn.diggama.com/files/doc.pdf"
Choiceenumstring"featured"
Multi-choicemulti-enumarray["news", "featured"]
Booleanbooleanbooleantrue
Colorcolorstring (HEX)"#2563eb"
Numbernumbernumber42
Moneymoneyobject{"amount": 29.99, "currency": "EUR"}
Datedatestring (YYYY-MM-DD)"2026-02-07"
Date and timedatetimestring (ISO 8601)"2026-02-07T14:30:00"
Durationdurationnumber (in the field's unit, minutes by default)90
Relation (single)referencestring (resource ID)"gKqv6dx6pBk9"
Relation (multiple)referencesarray (resource IDs)["gKqv6dx6pBk9", "xR4mN2vBwQy7"]
Useruserinteger (member ID)12
Addressaddressobject{"street": "1 rue de la Paix", "postal_code": "75002", "city": "Paris", "country": "FR"}

Rich text is sanitised server-side against an allowlist: tags and attributes outside it (scripts, event handlers…) are stripped. It can contain images and YouTube or Vimeo embeds inserted from the editor.

Relation values are the resource IDs the API hands out: you can send back exactly what you read.

Example API response ​

A blueprint blog-posts with fields: title (Text), slug (Slug), content (Rich text), cover (Image), featured (Boolean), category (Choice), author (Reference).

json
{
  "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.

Declare them in the blueprint's Variants setting: a name (e.g. English) and a slug (e.g. en) per variant, one of them marked as the default. In the editor, each variant gets its own tab.

When a blueprint has variants, pass the variant query parameter to any API endpoint:

GET /v2/resources/blog-posts?variant=fr

If omitted, the blueprint's default variant is used. The API response format stays the same: you get the attributes for the requested variant.

Diggama Documentation