---
title: "Create post"
method: POST
path: "/v1/posts"
tags: ["Posts"]
---

# Create post

`POST /v1/posts`

Create a new post. Requires a private API key. Category is required. If authors are not provided, the first workspace author is used.

## Request body

- CreatePostBody
  - `title` string, required
  - `content` string, required
  - `description` string, required
  - `slug` string, required
  - `categoryId` string, required
  - `status` 'published' | 'draft', required
  - `tags` string[] — Array of tag IDs to attach to the post
  - `authors` string[] — Array of author IDs. If omitted, the first workspace author is used.
  - `featured` boolean
  - `coverImage` string, uri, nullable
  - `publishedAt` string, date-time — ISO 8601 datetime. Defaults to current time if omitted.
  - `fields` object — Custom field values keyed by field key. Select values must use option values; multiselect values must be arrays of option values. Use null to clear optional fields.

## Response `201`

Post created successfully

- CreatePostResponse
  - `post` object, required
    - `id` string, required
    - `slug` string, required
    - `title` string, required
    - `status` string, required
    - `featured` boolean, required
    - `publishedAt` string, required
    - `createdAt` string, required

## Other responses

- `400` — Invalid request body or referenced resources not found
- `403` — Public API key used for write operation
- `409` — Post with this slug already exists
- `500` — Server error

---

[API](https://skmtc.dev/marblecms/apis/marble-api.md) · [All operations](https://skmtc.dev/marblecms/apis/marble-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marblecms/marble-api/revisions/ce3a22722c0e/schema)
