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
Request
- Base URLhttps://inblog.ai/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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
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.