curl --request POST \
--url https://{notifuseDomain}/api/blogCategories.update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "Product",
"slug": "product",
"description": "<string>",
"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/blogCategories.update"
payload = {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "Product",
"slug": "product",
"description": "<string>",
"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({
id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
name: 'Product',
slug: 'product',
description: '<string>',
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/blogCategories.update', 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/blogCategories.update",
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([
'id' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',
'name' => 'Product',
'slug' => 'product',
'description' => '<string>',
'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/blogCategories.update"
payload := strings.NewReader("{\n \"id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"name\": \"Product\",\n \"slug\": \"product\",\n \"description\": \"<string>\",\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/blogCategories.update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"name\": \"Product\",\n \"slug\": \"product\",\n \"description\": \"<string>\",\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/blogCategories.update")
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 \"id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"name\": \"Product\",\n \"slug\": \"product\",\n \"description\": \"<string>\",\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{
"category": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "product",
"settings": {
"name": "Product",
"description": "Release notes and product announcements.",
"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"
}
}{
"error": "category not found: blog category not found"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: write access to blog required",
"resource": "blog",
"permission": "write"
}Update a blog category
Replaces a category’s name, slug, description and SEO settings. This is not a patch: optional fields left out are cleared. Public pages are cached for up to 5 minutes, so a rename can take that long to show on the blog. Requires the blog write permission.
curl --request POST \
--url https://{notifuseDomain}/api/blogCategories.update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "Product",
"slug": "product",
"description": "<string>",
"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/blogCategories.update"
payload = {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "Product",
"slug": "product",
"description": "<string>",
"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({
id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
name: 'Product',
slug: 'product',
description: '<string>',
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/blogCategories.update', 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/blogCategories.update",
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([
'id' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',
'name' => 'Product',
'slug' => 'product',
'description' => '<string>',
'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/blogCategories.update"
payload := strings.NewReader("{\n \"id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"name\": \"Product\",\n \"slug\": \"product\",\n \"description\": \"<string>\",\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/blogCategories.update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"name\": \"Product\",\n \"slug\": \"product\",\n \"description\": \"<string>\",\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/blogCategories.update")
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 \"id\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n \"name\": \"Product\",\n \"slug\": \"product\",\n \"description\": \"<string>\",\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{
"category": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"slug": "product",
"settings": {
"name": "Product",
"description": "Release notes and product announcements.",
"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"
}
}{
"error": "category not found: blog category not found"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: write access to blog required",
"resource": "blog",
"permission": "write"
}Authorizations
API token for authentication
Query Parameters
The ID of the workspace. Passed in the query string, not the body.
Body
A full replacement, not a patch: description and seo are cleared when omitted. Send the category back with your changes applied.
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
255"Product"
Changing it changes the URL of the category page and of every post in it. No redirect is created from the old URLs.
100^[a-z0-9]+(?:-[a-z0-9]+)*$"product"
Search and social metadata for the page, exposed to the blog theme.
Show child attributes
Show child attributes
Response
Category updated
Show child attributes
Show child attributes
