---
title: "Update post"
method: PATCH
path: "/v1/posts/{identifier}"
tags: ["Posts"]
---

# Update post

`PATCH /v1/posts/{identifier}`

Update an existing post by ID or slug. All fields are optional — only provided fields are updated. Requires a private API key.

## Path parameters

- `identifier` string, required — Post ID or slug

## Request body

- UpdatePostBody
  - `title` string
  - `content` string
  - `description` string
  - `slug` string
  - `categoryId` string
  - `status` 'published' | 'draft'
  - `tags` string[] — Array of tag IDs. Replaces all existing tags when provided.
  - `authors` string[] — Array of author IDs. Replaces all existing authors when provided.
  - `featured` boolean
  - `coverImage` string, uri, nullable
  - `publishedAt` string, date-time
  - `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 `200`

Post updated successfully

- UpdatePostResponse
  - `post` object, required
    - `id` string, required
    - `slug` string, required
    - `title` string, required
    - `status` string, required
    - `featured` boolean, required
    - `publishedAt` string, required
    - `updatedAt` string, required

## Other responses

- `400` — Invalid request body or referenced resources not found
- `403` — Public API key used for write operation
- `404` — Post not found
- `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)
