List blog categories
curl --request GET \
--url https://{notifuseDomain}/api/blogCategories.list \
--header 'Authorization: Bearer <token>'import requests
url = "https://{notifuseDomain}/api/blogCategories.list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{notifuseDomain}/api/blogCategories.list', 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.list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{notifuseDomain}/api/blogCategories.list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{notifuseDomain}/api/blogCategories.list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogCategories.list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"categories": [
{
"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"
}
],
"total_count": 3
}{
"error": "workspace_id is required"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: read access to blog required",
"resource": "blog",
"permission": "read"
}{
"error": "Failed to list categories"
}Blog
List blog categories
Returns every category of the workspace’s blog, newest first. Not paginated. Requires the blog read permission.
GET
/
api
/
blogCategories.list
List blog categories
curl --request GET \
--url https://{notifuseDomain}/api/blogCategories.list \
--header 'Authorization: Bearer <token>'import requests
url = "https://{notifuseDomain}/api/blogCategories.list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{notifuseDomain}/api/blogCategories.list', 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.list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{notifuseDomain}/api/blogCategories.list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{notifuseDomain}/api/blogCategories.list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogCategories.list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"categories": [
{
"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"
}
],
"total_count": 3
}{
"error": "workspace_id is required"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: read access to blog required",
"resource": "blog",
"permission": "read"
}{
"error": "Failed to list categories"
}Authorizations
API token for authentication
Query Parameters
The ID of the workspace
