---
title: "Update a post variant"
method: PATCH
path: "/api/v1/variants/{variant_id}"
tags: ["posts"]
---

# Update a post variant

`PATCH /api/v1/variants/{variant_id}`

## 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/variants/{variant_id}`
- Auth: HTTP bearer

Updates editable copy or media for a draft, scheduled, or failed variant.

## Path parameters

- `variant_id` string, required

## Request body

- UpdateVariantRequest
  - `body` string, nullable
  - `media_ids` string[], nullable
  - `platform_target` string, nullable
  - `channel_id` string, nullable: Assign a channel to an unscheduled draft.

## Response `200`

Successful Response

- 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

- `401`: Missing or invalid Supabase bearer token.
- `404`: The requested resource was not found.
- `409`: The requested state transition is not allowed.
- `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)
