> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Blog CMS

> Create, edit, publish, and archive blog posts from the platform console.

The blog CMS lets platform administrators manage blog content published to [www.truthlocks.com/blog](https://www.truthlocks.com/blog). Write posts in the console editor, preview them inline, then publish when ready. Published posts automatically include structured data for search engines, cover images, and newsletter signup prompts.

<Info>
  Managing blog posts requires the **content admin** or **super admin** [platform role](/guides/platform-staff).
</Info>

## Prerequisites

* Platform administrator access to the [console](https://console.truthlocks.com)
* **Content admin** or **super admin** role

## Post fields

| Field             | Required | Description                                                           |
| :---------------- | :------- | :-------------------------------------------------------------------- |
| `title`           | Yes      | The post headline displayed on the blog and in search results         |
| `slug`            | Yes      | URL path segment (auto-generated from the title, editable)            |
| `category`        | Yes      | One of `engineering`, `product`, `security`, `company`, or `industry` |
| `content`         | Yes      | The full post body in Markdown                                        |
| `excerpt`         | No       | Short summary shown in post cards and search previews                 |
| `cover_image_url` | No       | URL to a cover image displayed at the top of the post                 |
| `tags`            | No       | Comma-separated keywords for filtering and discovery                  |

## Post statuses

| Status      | Description                                                |
| :---------- | :--------------------------------------------------------- |
| `draft`     | Not yet visible to readers — you can still edit all fields |
| `published` | Live on the public blog and indexed by search engines      |
| `archived`  | Removed from the public blog but preserved in the CMS      |

## Viewing posts

Navigate to **Blog** in the platform sidebar. The page shows a searchable list of all posts with their title, category, status, and publication date.

Use the status tabs — **All**, **Draft**, **Published**, **Archived** — to filter the list. The search bar filters by title, category, and tags.

## Creating a post

<Steps>
  <Step title="Open the editor">
    Click **New Post** to open the post editor.
  </Step>

  <Step title="Fill in post details">
    Enter a title, category, tags, cover image URL, and excerpt. The slug is generated automatically from the title — edit it manually if you need a different URL.
  </Step>

  <Step title="Write the content">
    Write the post body in the Markdown content editor.
  </Step>

  <Step title="Save or publish">
    Click **Save Draft** to save without publishing, or **Publish** to publish immediately. Draft posts can be published later from the post list or detail page.
  </Step>
</Steps>

## Editing a post

Click any post in the list to open its detail page. Update the title, slug, category, tags, cover image, excerpt, or content, then click **Save Changes**.

<Tip>
  Changing the slug of a published post updates its public URL. If the post has been shared or indexed, consider keeping the original slug to avoid broken links.
</Tip>

## Publishing and archiving

From the post list or detail page:

* **Publish** — makes a draft post live on the public blog. The post's `published_at` timestamp is set automatically.
* **Archive** — removes a published post from the public blog. The post remains in the CMS and can be published again later.

## Deleting a post

Click the delete icon next to any post in the list, or use the **Delete** button on the detail page. A confirmation prompt appears before the post is permanently removed.

<Warning>
  Deleting a post is permanent and cannot be undone. Archive the post instead if you may want to restore it later.
</Warning>

## Managing posts via the API

All blog API endpoints require platform admin authentication.

### List posts

```bash theme={null}
curl -X GET "https://api.truthlocks.com/v1/platform/blog/posts?status=published&category=engineering&limit=10&offset=0" \
  -H "X-API-Key: tl_live_your_api_key"
```

Query parameters:

| Parameter  | Type    | Description                                           |
| :--------- | :------ | :---------------------------------------------------- |
| `status`   | string  | Filter by status: `draft`, `published`, or `archived` |
| `category` | string  | Filter by category                                    |
| `limit`    | integer | Maximum number of posts to return (default: 50)       |
| `offset`   | integer | Number of posts to skip for pagination                |

Each post in the response includes:

| Field             | Type           | Description                                    |
| :---------------- | :------------- | :--------------------------------------------- |
| `id`              | string         | Unique post identifier                         |
| `title`           | string         | Post headline                                  |
| `slug`            | string         | URL path segment                               |
| `category`        | string         | Post category                                  |
| `status`          | string         | `draft`, `published`, or `archived`            |
| `tags`            | array          | List of tag strings                            |
| `excerpt`         | string         | Short summary                                  |
| `cover_image_url` | string         | Cover image URL                                |
| `published_at`    | string or null | ISO 8601 timestamp when the post was published |
| `created_at`      | string         | ISO 8601 creation timestamp                    |
| `updated_at`      | string         | ISO 8601 last-update timestamp                 |

### Create a post

```bash theme={null}
curl -X POST https://api.truthlocks.com/v1/platform/blog/posts \
  -H "X-API-Key: tl_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Introducing attestation batching",
    "slug": "introducing-attestation-batching",
    "category": "product",
    "tags": ["attestations", "batch"],
    "excerpt": "Mint up to 100 attestations in a single API call.",
    "content": "# Attestation batching\n\nYou can now mint attestations in bulk...",
    "status": "draft"
  }'
```

Set `status` to `"draft"` to save without publishing, or `"published"` to publish immediately.

### Get a post

```bash theme={null}
curl -X GET https://api.truthlocks.com/v1/platform/blog/posts/{id} \
  -H "X-API-Key: tl_live_your_api_key"
```

### Update a post

```bash theme={null}
curl -X PUT https://api.truthlocks.com/v1/platform/blog/posts/{id} \
  -H "X-API-Key: tl_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated title",
    "excerpt": "Revised summary for the post."
  }'
```

### Publish a post

```bash theme={null}
curl -X POST https://api.truthlocks.com/v1/platform/blog/posts/{id}/publish \
  -H "X-API-Key: tl_live_your_api_key"
```

### Archive a post

```bash theme={null}
curl -X POST https://api.truthlocks.com/v1/platform/blog/posts/{id}/archive \
  -H "X-API-Key: tl_live_your_api_key"
```

### Delete a post

```bash theme={null}
curl -X DELETE https://api.truthlocks.com/v1/platform/blog/posts/{id} \
  -H "X-API-Key: tl_live_your_api_key"
```

## Categories

Posts are organized into five categories. Readers can filter by category on the public blog.

| Category        | Use for                                                             |
| :-------------- | :------------------------------------------------------------------ |
| **Engineering** | Technical deep-dives, architecture decisions, and developer tooling |
| **Product**     | Feature launches, platform updates, and product strategy            |
| **Security**    | Security advisories, compliance updates, and trust infrastructure   |
| **Company**     | Team news, partnerships, and organizational updates                 |
| **Industry**    | Market analysis, regulatory developments, and ecosystem commentary  |

## SEO and structured data

Published posts automatically include:

* **Open Graph and Twitter Card tags** for rich social media previews
* **JSON-LD structured data** (`Article` schema) for search engine rich snippets
* **Canonical URLs** to prevent duplicate indexing

No additional configuration is needed — these are generated from the post's title, excerpt, cover image, and publication date.

## Related

<CardGroup cols={2}>
  <Card title="Newsletter campaigns" icon="envelope" href="/guides/newsletter">
    Send email broadcasts to your subscriber list.
  </Card>

  <Card title="Platform staff" icon="users" href="/guides/platform-staff">
    Manage administrator roles and permissions.
  </Card>
</CardGroup>
