Platform
ScaiWave ScaiGrid ScaiCore ScaiBot ScaiDrive ScaiKey Models Tools & Services
Solutions
Organisations Developers Internet Service Providers Managed Service Providers AI-in-a-Box
Resources
Support Documentation Blog Downloads
Company
About Research Careers Investment Opportunities Contact
Log in

Your first content type

Goal: model a blog post and read it back through the API.

1. Define the type#

In the admin UI: Content Types → + New.

Field Value
Name Blog Post
Slug blog-post
Is hierarchical off

Then add field definitions:

Slug Type Required Searchable
title text
slug slug
excerpt text
body markdown
hero_image asset
published_at datetime

2. Create your first post#

Content → + New and pick Blog Post. Fill in the form, hit Save.

3. Read it back#

bash
1
2
3
curl -H "Authorization: Bearer $JWT" \
     -H "X-Site-ID: $SITE" \
     "http://localhost:8000/api/v1/content?content_type=blog-post"

Response:

json
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "items": [
    {
      "id": "…",
      "slug": "hello-world",
      "title": "Hello, world",
      "fields": {
        "title": "Hello, world",
        "excerpt": "First post.",
        "body": "# Hello\n\nWelcome…",
        "hero_image": "asset-uuid",
        "published_at": "2026-05-16T10:00:00Z"
      },
      "status": "published",
      "...": "..."
    }
  ],
  "total": 1
}

4. Resolve assets#

The hero_image value is a bare asset UUID. The API proxy serves it at /api/v1/assets/<id>/file?variant=medium. The delivery service resolves these automatically when rendering.

What's next#

  • Wire it into a template pack (next tutorial).
  • Build a list page that queries content by type.
  • Add taxonomies for tags/categories.
Updated 2026-05-16 12:33:52 View source (.md) rev 2