curl --request POST \
--url https://{notifuseDomain}/api/blogPosts.create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "october-release",
"title": "What shipped in October",
"template_id": "blog_october_release",
"template_version": 1,
"excerpt": "A faster editor, scheduled broadcasts and a new API.",
"featured_image_url": "https://cdn.example.com/blog/october.png",
"authors": [
{
"name": "Jane Doe",
"avatar_url": "https://cdn.example.com/avatars/jane.png"
}
],
"reading_time_minutes": 4,
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": [
"release",
"changelog"
],
"meta_robots": "index,follow"
}
}
'import requests
url = "https://{notifuseDomain}/api/blogPosts.create"
payload = {
"category_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "october-release",
"title": "What shipped in October",
"template_id": "blog_october_release",
"template_version": 1,
"excerpt": "A faster editor, scheduled broadcasts and a new API.",
"featured_image_url": "https://cdn.example.com/blog/october.png",
"authors": [
{
"name": "Jane Doe",
"avatar_url": "https://cdn.example.com/avatars/jane.png"
}
],
"reading_time_minutes": 4,
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": ["release", "changelog"],
"meta_robots": "index,follow"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
slug: 'october-release',
title: 'What shipped in October',
template_id: 'blog_october_release',
template_version: 1,
excerpt: 'A faster editor, scheduled broadcasts and a new API.',
featured_image_url: 'https://cdn.example.com/blog/october.png',
authors: [{name: 'Jane Doe', avatar_url: 'https://cdn.example.com/avatars/jane.png'}],
reading_time_minutes: 4,
seo: {
meta_title: 'Release notes for October',
meta_description: 'Everything that shipped this month.',
og_title: '<string>',
og_description: '<string>',
og_image: 'https://cdn.example.com/og/october.png',
canonical_url: 'https://blog.example.com/product/october-release',
keywords: ['release', 'changelog'],
meta_robots: 'index,follow'
}
})
};
fetch('https://{notifuseDomain}/api/blogPosts.create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{notifuseDomain}/api/blogPosts.create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'category_id' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',
'slug' => 'october-release',
'title' => 'What shipped in October',
'template_id' => 'blog_october_release',
'template_version' => 1,
'excerpt' => 'A faster editor, scheduled broadcasts and a new API.',
'featured_image_url' => 'https://cdn.example.com/blog/october.png',
'authors' => [
[
'name' => 'Jane Doe',
'avatar_url' => 'https://cdn.example.com/avatars/jane.png'
]
],
'reading_time_minutes' => 4,
'seo' => [
'meta_title' => 'Release notes for October',
'meta_description' => 'Everything that shipped this month.',
'og_title' => '<string>',
'og_description' => '<string>',
'og_image' => 'https://cdn.example.com/og/october.png',
'canonical_url' => 'https://blog.example.com/product/october-release',
'keywords' => [
'release',
'changelog'
],
'meta_robots' => 'index,follow'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{notifuseDomain}/api/blogPosts.create"
payload := strings.NewReader("{\n \"category_id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"slug\": \"october-release\",\n \"title\": \"What shipped in October\",\n \"template_id\": \"blog_october_release\",\n \"template_version\": 1,\n \"excerpt\": \"A faster editor, scheduled broadcasts and a new API.\",\n \"featured_image_url\": \"https://cdn.example.com/blog/october.png\",\n \"authors\": [\n {\n \"name\": \"Jane Doe\",\n \"avatar_url\": \"https://cdn.example.com/avatars/jane.png\"\n }\n ],\n \"reading_time_minutes\": 4,\n \"seo\": {\n \"meta_title\": \"Release notes for October\",\n \"meta_description\": \"Everything that shipped this month.\",\n \"og_title\": \"<string>\",\n \"og_description\": \"<string>\",\n \"og_image\": \"https://cdn.example.com/og/october.png\",\n \"canonical_url\": \"https://blog.example.com/product/october-release\",\n \"keywords\": [\n \"release\",\n \"changelog\"\n ],\n \"meta_robots\": \"index,follow\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{notifuseDomain}/api/blogPosts.create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category_id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"slug\": \"october-release\",\n \"title\": \"What shipped in October\",\n \"template_id\": \"blog_october_release\",\n \"template_version\": 1,\n \"excerpt\": \"A faster editor, scheduled broadcasts and a new API.\",\n \"featured_image_url\": \"https://cdn.example.com/blog/october.png\",\n \"authors\": [\n {\n \"name\": \"Jane Doe\",\n \"avatar_url\": \"https://cdn.example.com/avatars/jane.png\"\n }\n ],\n \"reading_time_minutes\": 4,\n \"seo\": {\n \"meta_title\": \"Release notes for October\",\n \"meta_description\": \"Everything that shipped this month.\",\n \"og_title\": \"<string>\",\n \"og_description\": \"<string>\",\n \"og_image\": \"https://cdn.example.com/og/october.png\",\n \"canonical_url\": \"https://blog.example.com/product/october-release\",\n \"keywords\": [\n \"release\",\n \"changelog\"\n ],\n \"meta_robots\": \"index,follow\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogPosts.create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category_id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"slug\": \"october-release\",\n \"title\": \"What shipped in October\",\n \"template_id\": \"blog_october_release\",\n \"template_version\": 1,\n \"excerpt\": \"A faster editor, scheduled broadcasts and a new API.\",\n \"featured_image_url\": \"https://cdn.example.com/blog/october.png\",\n \"authors\": [\n {\n \"name\": \"Jane Doe\",\n \"avatar_url\": \"https://cdn.example.com/avatars/jane.png\"\n }\n ],\n \"reading_time_minutes\": 4,\n \"seo\": {\n \"meta_title\": \"Release notes for October\",\n \"meta_description\": \"Everything that shipped this month.\",\n \"og_title\": \"<string>\",\n \"og_description\": \"<string>\",\n \"og_image\": \"https://cdn.example.com/og/october.png\",\n \"canonical_url\": \"https://blog.example.com/product/october-release\",\n \"keywords\": [\n \"release\",\n \"changelog\"\n ],\n \"meta_robots\": \"index,follow\"\n }\n}"
response = http.request(request)
puts response.read_body{
"post": {
"id": "1b4e28ba-2fa1-11d2-883f-0016d3cca427",
"category_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "october-release",
"settings": {
"title": "What shipped in October",
"template": {
"template_id": "blog_october_release",
"template_version": 3
},
"reading_time_minutes": 4,
"excerpt": "A faster editor, scheduled broadcasts and a new API.",
"featured_image_url": "https://cdn.example.com/blog/october.png",
"authors": [
{
"name": "Jane Doe",
"avatar_url": "https://cdn.example.com/avatars/jane.png"
}
],
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": [
"release",
"changelog"
],
"meta_robots": "index,follow"
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"published_at": "2026-10-01T09:00:00Z"
}
}Create a blog post
Creates a post as a draft. The post holds the metadata; its body lives in a web template, so publishing a post over the API takes three calls:
templates.createwithchannel: "web",category: "blog"and awebobject.web.htmlis the body readers see, rendered as-is.web.contentis required and is the Tiptap document the console editor opens; if you only have HTML, send{"type": "doc", "content": []}, and do not edit that post in the console afterwards, because saving there regeneratesweb.htmlfromweb.content.blogPosts.createwith that template’sidastemplate_id.blogPosts.publish.
Requires the blog write permission, plus the templates write permission for step 1.
curl --request POST \
--url https://{notifuseDomain}/api/blogPosts.create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "october-release",
"title": "What shipped in October",
"template_id": "blog_october_release",
"template_version": 1,
"excerpt": "A faster editor, scheduled broadcasts and a new API.",
"featured_image_url": "https://cdn.example.com/blog/october.png",
"authors": [
{
"name": "Jane Doe",
"avatar_url": "https://cdn.example.com/avatars/jane.png"
}
],
"reading_time_minutes": 4,
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": [
"release",
"changelog"
],
"meta_robots": "index,follow"
}
}
'import requests
url = "https://{notifuseDomain}/api/blogPosts.create"
payload = {
"category_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "october-release",
"title": "What shipped in October",
"template_id": "blog_october_release",
"template_version": 1,
"excerpt": "A faster editor, scheduled broadcasts and a new API.",
"featured_image_url": "https://cdn.example.com/blog/october.png",
"authors": [
{
"name": "Jane Doe",
"avatar_url": "https://cdn.example.com/avatars/jane.png"
}
],
"reading_time_minutes": 4,
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": ["release", "changelog"],
"meta_robots": "index,follow"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
slug: 'october-release',
title: 'What shipped in October',
template_id: 'blog_october_release',
template_version: 1,
excerpt: 'A faster editor, scheduled broadcasts and a new API.',
featured_image_url: 'https://cdn.example.com/blog/october.png',
authors: [{name: 'Jane Doe', avatar_url: 'https://cdn.example.com/avatars/jane.png'}],
reading_time_minutes: 4,
seo: {
meta_title: 'Release notes for October',
meta_description: 'Everything that shipped this month.',
og_title: '<string>',
og_description: '<string>',
og_image: 'https://cdn.example.com/og/october.png',
canonical_url: 'https://blog.example.com/product/october-release',
keywords: ['release', 'changelog'],
meta_robots: 'index,follow'
}
})
};
fetch('https://{notifuseDomain}/api/blogPosts.create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{notifuseDomain}/api/blogPosts.create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'category_id' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',
'slug' => 'october-release',
'title' => 'What shipped in October',
'template_id' => 'blog_october_release',
'template_version' => 1,
'excerpt' => 'A faster editor, scheduled broadcasts and a new API.',
'featured_image_url' => 'https://cdn.example.com/blog/october.png',
'authors' => [
[
'name' => 'Jane Doe',
'avatar_url' => 'https://cdn.example.com/avatars/jane.png'
]
],
'reading_time_minutes' => 4,
'seo' => [
'meta_title' => 'Release notes for October',
'meta_description' => 'Everything that shipped this month.',
'og_title' => '<string>',
'og_description' => '<string>',
'og_image' => 'https://cdn.example.com/og/october.png',
'canonical_url' => 'https://blog.example.com/product/october-release',
'keywords' => [
'release',
'changelog'
],
'meta_robots' => 'index,follow'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{notifuseDomain}/api/blogPosts.create"
payload := strings.NewReader("{\n \"category_id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"slug\": \"october-release\",\n \"title\": \"What shipped in October\",\n \"template_id\": \"blog_october_release\",\n \"template_version\": 1,\n \"excerpt\": \"A faster editor, scheduled broadcasts and a new API.\",\n \"featured_image_url\": \"https://cdn.example.com/blog/october.png\",\n \"authors\": [\n {\n \"name\": \"Jane Doe\",\n \"avatar_url\": \"https://cdn.example.com/avatars/jane.png\"\n }\n ],\n \"reading_time_minutes\": 4,\n \"seo\": {\n \"meta_title\": \"Release notes for October\",\n \"meta_description\": \"Everything that shipped this month.\",\n \"og_title\": \"<string>\",\n \"og_description\": \"<string>\",\n \"og_image\": \"https://cdn.example.com/og/october.png\",\n \"canonical_url\": \"https://blog.example.com/product/october-release\",\n \"keywords\": [\n \"release\",\n \"changelog\"\n ],\n \"meta_robots\": \"index,follow\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{notifuseDomain}/api/blogPosts.create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category_id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"slug\": \"october-release\",\n \"title\": \"What shipped in October\",\n \"template_id\": \"blog_october_release\",\n \"template_version\": 1,\n \"excerpt\": \"A faster editor, scheduled broadcasts and a new API.\",\n \"featured_image_url\": \"https://cdn.example.com/blog/october.png\",\n \"authors\": [\n {\n \"name\": \"Jane Doe\",\n \"avatar_url\": \"https://cdn.example.com/avatars/jane.png\"\n }\n ],\n \"reading_time_minutes\": 4,\n \"seo\": {\n \"meta_title\": \"Release notes for October\",\n \"meta_description\": \"Everything that shipped this month.\",\n \"og_title\": \"<string>\",\n \"og_description\": \"<string>\",\n \"og_image\": \"https://cdn.example.com/og/october.png\",\n \"canonical_url\": \"https://blog.example.com/product/october-release\",\n \"keywords\": [\n \"release\",\n \"changelog\"\n ],\n \"meta_robots\": \"index,follow\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogPosts.create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category_id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"slug\": \"october-release\",\n \"title\": \"What shipped in October\",\n \"template_id\": \"blog_october_release\",\n \"template_version\": 1,\n \"excerpt\": \"A faster editor, scheduled broadcasts and a new API.\",\n \"featured_image_url\": \"https://cdn.example.com/blog/october.png\",\n \"authors\": [\n {\n \"name\": \"Jane Doe\",\n \"avatar_url\": \"https://cdn.example.com/avatars/jane.png\"\n }\n ],\n \"reading_time_minutes\": 4,\n \"seo\": {\n \"meta_title\": \"Release notes for October\",\n \"meta_description\": \"Everything that shipped this month.\",\n \"og_title\": \"<string>\",\n \"og_description\": \"<string>\",\n \"og_image\": \"https://cdn.example.com/og/october.png\",\n \"canonical_url\": \"https://blog.example.com/product/october-release\",\n \"keywords\": [\n \"release\",\n \"changelog\"\n ],\n \"meta_robots\": \"index,follow\"\n }\n}"
response = http.request(request)
puts response.read_body{
"post": {
"id": "1b4e28ba-2fa1-11d2-883f-0016d3cca427",
"category_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "october-release",
"settings": {
"title": "What shipped in October",
"template": {
"template_id": "blog_october_release",
"template_version": 3
},
"reading_time_minutes": 4,
"excerpt": "A faster editor, scheduled broadcasts and a new API.",
"featured_image_url": "https://cdn.example.com/blog/october.png",
"authors": [
{
"name": "Jane Doe",
"avatar_url": "https://cdn.example.com/avatars/jane.png"
}
],
"seo": {
"meta_title": "Release notes for October",
"meta_description": "Everything that shipped this month.",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "https://cdn.example.com/og/october.png",
"canonical_url": "https://blog.example.com/product/october-release",
"keywords": [
"release",
"changelog"
],
"meta_robots": "index,follow"
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"published_at": "2026-10-01T09:00:00Z"
}
}Authorizations
API token for authentication
Query Parameters
The ID of the workspace. Passed in the query string, not the body.
Body
An existing category.
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
Lowercase letters, digits and single hyphens. Must be unique across the whole workspace, not just within the category.
100^[a-z0-9]+(?:-[a-z0-9]+)*$"october-release"
500"What shipped in October"
A web template (channel: web) holding the post body — create it first with templates.create. Its existence is not checked here: a post pointing at a missing template is saved and renders with an empty body.
"blog_october_release"
The template version to render. Omit it (or send 0) to always render the template's latest version; pin a version to control exactly when a template edit reaches readers.
1
"A faster editor, scheduled broadcasts and a new API."
"https://cdn.example.com/blog/october.png"
Show child attributes
Show child attributes
4
Search and social metadata for the page, exposed to the blog theme.
Show child attributes
Show child attributes
Response
Post created as a draft
Show child attributes
Show child attributes
