Posts

Update Post (PUT)

Update a post using PUT. The current implementation treats PUT and PATCH identically.

put/posts/{id}

Request

Path parameters

idinteger required

Post ID

Query parameters

preserve_external_imagesboolean

Preserve external image URLs instead of uploading to R2 storage

Request body

Example request

{
  "jsonapi": {
    "version": "1.0"
  },
  "data": {
    "type": "posts",
    "attributes": {
      "title": "Building a Blog with Next.js (Updated)",
      "slug": "building-blog-with-nextjs-updated",
      "description": "Updated post description.",
      "content_html": "<h2>Updated Title</h2><p>Modified content.</p>",
      "published": true,
      "canonical_url": "https://myblog.com/posts/nextjs-tutorial",
      "cta_text": "Learn More",
      "cta_color": "#7c3aed",
      "cta_color_type": "custom",
      "cta_text_color": "#ffffff",
      "cta_text_color_type": "custom",
      "form_id": 123,
      "custom_scripts": {
        "json_ld_script": {
          "@context": "https://schema.org",
          "@type": "BlogPosting",
          "headline": "Building a Blog with Next.js",
          "author": {
            "@type": "Person",
            "name": "John Doe"
          }
        }
      },
      "notion_url": "https://www.notion.so/My-Page-abc123def456"
    },
    "relationships": {
      "tags": {
        "data": [
          {
            "type": "tags",
            "id": "123"
          }
        ]
      }
    }
  }
}

Response

Post updated successfully

Example response

{
  "jsonapi": {
    "version": "1.0"
  },
  "data": {
    "type": "posts",
    "id": "123",
    "attributes": {
      "title": "Building a Blog with Next.js",
      "slug": "nextjs-blog-tutorial",
      "description": "Learn how to build a blog using Next.js and TypeScript.",
      "content_html": "<h2>Getting Started</h2><p>Let's build a blog with Next.js.</p><div data-type=\"imageBlock\"><img src=\"https://source.inblog.dev/image.jpg\" alt=\"Next.js Logo\"></div>",
      "published_at": "2024-01-15T09:30:00Z",
      "image": {
        "url": "https://source.inblog.dev/featured_image/2025-11-27T07:55:29.824Z-3e1e9fda-41ae-4dfb-a76b-28edfa3a6dd9",
        "blurhash": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAFCAIAAADzBuo/...",
        "created_at": "2025-11-27T07:55:30.897Z"
      },
      "canonical_url": "https://myblog.com/posts/nextjs-tutorial",
      "meta_title": "Next.js Blog Tutorial | My Blog",
      "meta_description": "A complete guide to building a blog with Next.js and TypeScript. Learn through step-by-step tutorials and real examples.",
      "cta_text": "Learn More",
      "cta_link": "https://example.com/signup",
      "cta_color": "#7c3aed",
      "cta_color_type": "custom",
      "cta_text_color": "#ffffff",
      "cta_text_color_type": "custom",
      "form_id": 123,
      "custom_scripts": {
        "head_start_script": "<script>console.log(\"head start\");</script>",
        "head_end_script": "<script>console.log(\"head end\");</script>",
        "body_start_script": "<script>console.log(\"body start\");</script>",
        "body_end_script": "<script>console.log(\"body end\");</script>",
        "json_ld_script": {
          "@context": "https://schema.org",
          "@type": "BlogPosting",
          "headline": "Building a Blog with Next.js",
          "description": "How to build a blog using Next.js and TypeScript",
          "author": {
            "@type": "Person",
            "name": "John Doe",
            "url": "https://myblog.com/authors/john-doe"
          },
          "datePublished": "2024-01-15T09:30:00+09:00",
          "dateModified": "2024-01-16T15:00:00+09:00",
          "image": {
            "@type": "ImageObject",
            "url": "https://source.inblog.dev/featured_image.jpg",
            "width": 1200,
            "height": 630
          },
          "publisher": {
            "@type": "Organization",
            "name": "My Blog",
            "logo": {
              "@type": "ImageObject",
              "url": "https://myblog.com/logo.png"
            }
          },
          "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https://myblog.com/posts/nextjs-tutorial"
          },
          "keywords": "Next.js, React, TypeScript, Blog",
          "articleSection": "Development",
          "wordCount": 1500
        }
      }
    },
    "relationships": {
      "tags": {
        "data": {
          "type": "tags",
          "id": "123"
        }
      },
      "authors": {
        "data": {
          "type": "tags",
          "id": "123"
        }
      }
    }
  },
  "included": [
    {
      "type": "tags",
      "attributes": {
        "name": "JavaScript",
        "slug": "javascript"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 4 revisions of this API.