---
title: "Update Post"
method: PATCH
path: "/posts/{id}"
tags: ["Posts"]
---

# Update Post

`PATCH /posts/{id}`

Update the content and settings of an existing post.

**Image Processing:**
External image URLs are uploaded to Inblog R2 storage by default.
To preserve original URLs, use the `preserve_external_images=true` query parameter.

## Path parameters

- `id` integer, required

## Query parameters

- `preserve_external_images` boolean

## Request body

- PostUpdateRequest
  - `jsonapi` object, required — JSON:API version metadata included in every JSON:API response.
    - `version` string, required — Implemented JSON:API version.
  - `data` object — Post resource payload to update.
    - `type` 'posts', required — Resource type identifier. Always `posts`.
    - `attributes` object — Post fields to update. Only included fields are changed.
      - `title` string — Post title - Recommended under 60 characters for SEO - Maximum 200 characters
      - `slug` string — URL-friendly unique identifier - Only lowercase letters, numbers, and hyphens allowed - Must be unique
      - `description` string — Post summary description - Used as SEO meta description - Maximum 160 characters
      - `content_html` string — "Post content HTML (generated with TipTap editor) **Generation Method:** - Inblog uses a TipTap-based WYSIWYG editor to generate HTML - Real-time HTML conversion using editor.getHTML() method - All content is managed in structured block units **Basic HTML Tags:** - Paragraph: `<p>` - Headings: `<h2>`, `<h3>`, `<h4>` (h1, h5, h6 not supported) - Lists: `<ul>`, `<ol>`, `<li>` (nesting supported) - Text styles: `<strong>`, `<em>`, `<u>`, `<s>`, `<code>` - Links: `<a>` (no rel attribute, nofollow removed) - Quote: `<blockquote>` - Horizontal rule: `<hr>` - Line break: `<br>` **Advanced Formatting:** - Highlight: `<mark>` (multiple colors supported) - Text color: `<span style=\"color: #hex;\">` - Text alignment: `style=\"text-align: left|center|right;\"` - Code block: `<pre><code class=\"language-*\">` (syntax highlighting supported) **Tables:** - `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>`, `<td>` - Resizable columns (colwidth attribute) - Automatic horizontal scroll wrapping **Custom Blocks (distinguished by data-type attribute):** - Image: `<img data-type=\"imageBlock\">` - Single image block - Image grid: `<div data-type=\"imageGrid\">` - Grid layout - Image carousel: `<div data-type=\"imageCarousel\">` - Slide format - Callout: `<div data-type=\"callOut\">` - Emphasis box - Link button: `<div data-type=\"linkButton\">` - CTA button - Bookmark: `<div data-type=\"bookmark\">` - URL preview **Embed Support:** - YouTube: `<div data-type=\"youtube\" data-youtube-video-id=\"*\">` - Form services: - Google Forms: `<div data-type=\"googleForm\">` - HubSpot: `<div data-type=\"hubspot\">` - Tally: `<div data-type=\"tally\">` - Typeform: `<div data-type=\"typeform\">` - HTML code block: `<section data-type=\"code-block\"><div>...</div></section>` - Custom HTML insertion (iframes, etc). Must use `section` tag + `data-type=\"code-block\"` + inner `<div>` wrapper to match the tiptap schema **Security and Limitations:** - `<script>` tags are automatically removed (XSS prevention) - Images should use Inblog CDN (source.inblog.dev) - External stylesheet links are restricted - iframes are only allowed for permitted embed services - Must send entire HTML again for partial updates\n"
      - `published` boolean — Publication status (immediate publish/unpublish)
      - `image` union
        - string, uri — Image URL (external URLs are uploaded to Inblog storage by default, source.inblog.dev or image.inblog.dev URLs are used as-is)
        - string — Base64 data URL (max 10MB, always uploaded to Inblog storage)
        - object — Image object (URL field follows the same rules as above)
          - `url` string, uri — Image URL
          - `blurhash` string — Blur hash (optional)
          - `created_at` string, date-time — Creation time (optional)
      - `canonical_url` string, uri — Canonical URL (for duplicate content prevention) - SEO optimization - Specify original content URL
      - `meta_title` string — SEO meta title - Displayed in browser tab - Recommended maximum 60 characters
      - `meta_description` string — SEO meta description - Displayed in search results - Recommended maximum 160 characters
      - `cta_text` string — CTA (Call-to-Action) button text
      - `cta_link` string, uri — CTA button destination URL
      - `cta_color` string — CTA button background color (hex color) - 6-digit hex code (#RRGGBB) - Default: blog theme color
      - `cta_color_type` 'custom' | 'preset' | 'default' — CTA button background color type - custom: use the custom color specified in cta_color - preset: use blog preset color - default: use blog theme color
      - `cta_text_color` string — CTA button text color (hex color) - 6-digit hex code (#RRGGBB) - Default: #ffffff (white)
      - `cta_text_color_type` 'custom' | 'preset' | 'default' — CTA button text color type - custom: use the custom color specified in cta_text_color - default: auto-calculated from button background contrast (#ffffff or #000000) - Sending cta_text_color without setting this to 'custom' may result in the color being overridden by the editor
      - `form_id` integer, nullable — Form ID to attach to the post. Set to null to remove the form.
      - `custom_scripts` object, nullable — Custom scripts inserted into the post
        - `head_start_script` string, nullable — Script inserted at the start of <head> tag (script tag format)
        - `head_end_script` string, nullable — Script inserted at the end of <head> tag (script tag format)
        - `body_start_script` string, nullable — Script inserted at the start of <body> tag (script tag format)
        - `body_end_script` string, nullable — Script inserted at the end of <body> tag (script tag format)
        - `json_ld_script` object — JSON-LD Object
      - `notion_url` string, uri, nullable — Notion page URL for syncing content from Notion. **Behavior:** - When provided: Fetches the Notion page content and sets content_type to 'notion' - When set to null: Clears Notion data and resets content_type to 'tiptap' (converts to regular post) - When omitted: No changes to existing Notion settings **Supported URL formats:** - https://www.notion.so/page-name-{page_id} - https://notion.so/page-name-{page_id} - https://*.notion.site/page-name-{page_id} **Note:** The Notion page must be published to web for access.
    - `relationships` object — **How to link tags/authors:** 1. Get tag list via `GET /v1/tags` 2. Get author list via `GET /v1/authors` 3. Use the actual ID values from the response **Note:** Using non-existent IDs or IDs not belonging to this blog will result in a 400 error.
      - `tags` object — Replacement tag relationships for the post.
        - `data` union
          - ResourceIdentifier[] — Tag resource identifiers to keep attached to the post.
            - `type` string, required — Resource type (required) - posts, tags, authors etc.
            - `id` string, required — Resource ID (required) - String format - Must be unique within its type **Important:** The example value (123) is a sample. For actual use: - Get Tag IDs: `GET /v1/tags` - Get Author IDs: `GET /v1/authors` Using non-existent IDs will result in a 400 error.
          - unknown

## Response `200`

Post updated successfully

## Other responses

- `401` — Authentication failed
- `403` — Insufficient permissions
- `404` — Resource not found
- `409` — Resource conflict
- `500` — 서버 내부 오류

---

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