↑ ↓ to navigate
↵ to select
esc to close
GET Blueprints

Blueprints API

https://api.airogelcms.com/v1/accounts/:account_id/blueprints

A blueprint is a field schema. It lists the fields an entry, global or navigation item has and the type of each field. Collections use blueprints for their entries, and globals embed one. See Content Modeling and the Field Types Reference.

Operations

  • GET /v1/accounts/:account_id/blueprints - List blueprints
  • GET /v1/accounts/:account_id/blueprints/:id - Get one blueprint
  • POST /v1/accounts/:account_id/blueprints - Create a blueprint
  • PUT / PATCH /v1/accounts/:account_id/blueprints/:id - Update a blueprint
  • DELETE /v1/accounts/:account_id/blueprints/:id - Delete a blueprint (returns 204)

:id is the blueprint's blprt_ ID or handle.

Blueprint fields

FieldTypeRequiredDescription
titlestringyesDisplay name
handlestringnoGenerated from the title if you leave it out. A generated handle that collides gets _2, _3 and so on appended. POST with an existing handle updates that blueprint.
fieldsarraynoField definitions (see below). This is the full list: fields you leave out are removed.

Field definition

KeyTypeRequiredDescription
handlestringyesUnique within the blueprint. This is the key used on entries and in Liquid.
typestringyesOne of the 14 types below
displaystringnoLabel. Defaults to the titleized handle. On update, leaving it out keeps the current label.
positionintegernoOrder in the editor. Defaults to the field's index in the array.
optionsobjectnoType-specific settings (see below). On update, leaving it out keeps the field's existing options.

Field types

TypeStores
textPlain text
rich_textFormatted HTML from the rich text editor
raw_htmlUnprocessed HTML or embed code
imageOne image asset
videoA video URL (for example YouTube or Vimeo) with optional ID and thumbnail
galleryA list of images
templateA reference to a Liquid template
entityA reference to one other entry, or several with multiple
collectionA dynamic list of entries from a collection
toggleBoolean
numberInteger or decimal
enumerateOne choice from a fixed list (select or radio)
listRepeatable list of values
dictionaryKey-value pairs

Responses always use these short names. Any other value returns 422 with path fields[i].type and the list of valid types.

Options

TypeOptionDescription
enumerateenumerationsArray of allowed values, for example ["draft", "review", "final"]
enumeratedisplay_asselect (default) or radio
entitymultipletrue to allow several referenced entries. Default false.
collectioncollection_handleThe collection to pull entries from
collectionmax_itemsDefault 10
collectiondefault_filter_field, default_filter_value, default_filter_operatorOptional default filter
numbernumber_typedecimal (default) or integer
numberdecimal_placesRounding precision. Unset means unrestricted.
list, dictionarymax_itemsDefault 10
gallerymax_itemsDefault 20
anyrequired, placeholder, help_text, input_typeUsed when the blueprint backs a form. See form_for.

Parameters

Name Type Required Description
account_id string Required Path. Your account prefix ID (acct_...).
id string Optional Path, for show/update/delete. Blueprint blprt_ ID or handle.
handle string Optional Query, list only. Return only the record with exactly this handle.
page integer Optional Query, list only. Page number, starting at 1. The page size is fixed at 20.
title string Required Body. Display name.
handle string Optional Body. Generated from the title if omitted. POST with an existing handle updates it.
fields array Optional Body. Full list of field definitions {handle, type, display, position, options}. [] removes every field. Leave it out to keep the current fields.

Request Example

# List blueprints
curl "https://api.airogelcms.com/v1/accounts/$ACCOUNT_ID/blueprints" \
  -H "Authorization: Bearer $API_TOKEN"

# Create a blueprint
curl -X POST "https://api.airogelcms.com/v1/accounts/$ACCOUNT_ID/blueprints" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Blog Post",
    "handle": "blog_post",
    "fields": [
      {"handle": "body", "display": "Body", "type": "rich_text"},
      {"handle": "excerpt", "display": "Excerpt", "type": "text"},
      {"handle": "featured_image", "display": "Featured Image", "type": "image"},
      {"handle": "status", "display": "Status", "type": "enumerate",
       "options": {"enumerations": ["draft", "review", "final"], "display_as": "select"}},
      {"handle": "related_posts", "display": "Related Posts", "type": "entity",
       "options": {"multiple": true}}
    ]
  }'

# Update: send the COMPLETE field list. Fields left out are deleted with their values.
curl -X PUT "https://api.airogelcms.com/v1/accounts/$ACCOUNT_ID/blueprints/blog_post" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": [
      {"handle": "body", "display": "Body", "type": "rich_text"},
      {"handle": "excerpt", "display": "Summary", "type": "text"},
      {"handle": "featured_image", "display": "Featured Image", "type": "image"},
      {"handle": "status", "display": "Status", "type": "enumerate"},
      {"handle": "related_posts", "display": "Related Posts", "type": "entity"},
      {"handle": "reading_time", "display": "Reading Time", "type": "number",
       "options": {"number_type": "integer"}}
    ]
  }'

# Rename without touching fields
curl -X PATCH "https://api.airogelcms.com/v1/accounts/$ACCOUNT_ID/blueprints/blog_post" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title": "Article"}'

Response Example

// Single blueprint (show, create, update)
{
  "id": "blprt_8xNw2Ls",
  "handle": "blog_post",
  "title": "Blog Post",
  "fields": [
    { "handle": "body", "display": "Body", "type": "rich_text", "position": 0, "options": {} },
    { "handle": "excerpt", "display": "Excerpt", "type": "text", "position": 1, "options": {} },
    { "handle": "featured_image", "display": "Featured Image", "type": "image", "position": 2, "options": {} },
    { "handle": "status", "display": "Status", "type": "enumerate", "position": 3,
      "options": { "enumerations": ["draft", "review", "final"], "display_as": "select" } },
    { "handle": "related_posts", "display": "Related Posts", "type": "entity", "position": 4,
      "options": { "multiple": true } }
  ],
  "created_at": "2026-09-01T14:00:00Z",
  "updated_at": "2026-09-01T14:00:00Z"
}

// List
{
  "data": [
    { "id": "blprt_8xNw2Ls", "handle": "blog_post", "title": "Blog Post", "fields": ["..."], "created_at": "2026-09-01T14:00:00Z", "updated_at": "2026-09-01T14:00:00Z" }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 1,
    "total_pages": 1,
    "next_page": null,
    "prev_page": null
  }
}

// 422 - bad field type
{
  "error": "Validation failed",
  "details": [
    { "path": "fields[1].type", "message": "\"richtext\" is not a field type; expected one of collection, dictionary, entity, enumerate, gallery, image, list, number, raw_html, rich_text, template, text, toggle, video" }
  ]
}

Additional Notes

fields is a full replacement. On update, fields are matched by handle. New handles are added and existing ones are updated. Any existing field not in the array is removed together with its stored values on every entry. Always fetch the blueprint first and send back every field you want to keep. "fields": [] removes all fields. Leaving fields out entirely leaves the schema untouched.

All or nothing. The title, handle and field list are validated before anything is written and saved in one transaction. A 422 means nothing changed.

Type names. Use the short names above. The long internal class names (for example BlueprintFieldRichText) are also accepted on input, but responses always use short names.

Deleting a blueprint deletes its fields and every value stored in them.

A blueprint can belong to only one collection, global or navigation. Attach it to a collection with blueprint_handle when you create the collection.