Posts

Create Post

Create a new blog post.

Required Fields:

  • title: Post title
  • slug: URL slug (must be unique within the blog)

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.

Limitations:

  • The id field is not allowed. Post ID is generated automatically by the server.
  • To update an existing post, use PATCH /posts/{id}.

Response Codes:

  • 201: Post created successfully
  • 400: Bad request (e.g., id field included)
  • 409: Slug already exists

External image URLs will be automatically saved to Inblog storage.

post/posts

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",
      "slug": "building-blog-with-nextjs",
      "content_html": "<h2>Getting Started</h2><p>Let's build a blog with Next.js.</p>",
      "cta_color": "#7c3aed",
      "cta_text_color": "#ffffff",
      "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"
          }
        ]
      },
      "authors": {
        "data": [
          {
            "type": "tags",
            "id": "123"
          }
        ]
      }
    }
  }
}

Response

Post created successfully

Changes

No recorded changes to this endpoint across all 1 revision of this API.