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

# Create a post

`POST /api/v1/posts`

## Request

- Base URL: `https://api.cadencz.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cadencz.com/api/v1/posts`
- Auth: HTTP bearer

Creates a post and one or more channel-specific variants. Variants with `scheduled_at` are persisted for the Cloudflare Cron worker.

## Request body

- PostCreate
  - `idea` string, required
  - `source` 'manual' | 'agent'
  - `brain_id` string, nullable
  - `timezone` string: IANA zone the schedule times were chosen in. `scheduled_at` is already absolute, so this does not move the post — it records what the customer meant, which is what a later reschedule or a best-time read has to honour.
  - `variants` VariantCreate[]
    - `channel_id` string, nullable
    - `platform` string, required
    - `body` string, required
    - `media_ids` string[]
    - `platform_target` string, nullable: Optional platform-specific destination, e.g. Reddit subreddit.
    - `scheduled_at` string, date-time, nullable
    - `content_metadata` object
    - `thread_id` string, nullable
    - `thread_position` integer, nullable

## Response `201`

Successful Response

- PostRead
  - `id` string, required
  - `workspace_id` string, required
  - `idea` string, required
  - `source` string, required
  - `brain_id` string, nullable, required
  - `variants` VariantRead[]
    - `id` string, required
    - `post_id` string, required
    - `channel_id` string, nullable, required
    - `platform` string, required
    - `body` string, required
    - `media_ids` string[], required
    - `media` MediaRead[]
      - `id` string, required
      - `kind` string, required
      - `url` string, required
      - `alt_text` string, nullable
      - `width` integer, nullable
      - `height` integer, nullable
      - `bytes` integer, nullable
    - `platform_target` string, nullable, required
    - `status` string, required
    - `scheduled_at` string, date-time, nullable, required
    - `published_at` string, date-time, nullable, required
    - `provider_url` string, nullable, required
    - `error` string, nullable, required
    - `attempt_count` integer, required
    - `content_metadata` object
    - `thread_id` string, nullable
    - `thread_position` integer, nullable

## Other responses

- `400`: The request payload is invalid.
- `401`: Missing or invalid Supabase bearer token.
- `422`: Validation Error

---

[API](https://skmtc.dev/cadencz/apis/cadencz-api.md) · [All operations](https://skmtc.dev/cadencz/apis/cadencz-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cadencz/apis/cadencz-api/revisions/3392fe5e93db?raw)
