List posts
curl --request GET \
--url https://{host}/api/v1/posts \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/api/v1/posts"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/api/v1/posts', 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://{host}/api/v1/posts",
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: <api-key>"
],
]);
$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://{host}/api/v1/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/v1/posts")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"posts": [
{
"id": 1,
"type": "Post",
"status": "Complete",
"title": "How we improved onboarding",
"content": "The full body of the post",
"author_email": "jane@example.com",
"canonical_url": "https://example.com/posts/how-we-improved-onboarding",
"created_at": "2024-01-01T00:00:00Z",
"introduction": "A short summary of the post",
"thumbnail": "https://example.com/thumbnail.png",
"internal_url": "https://example.com/posts/how-we-improved-onboarding",
"doi": "https://doi.org/10.1000/example",
"published_at": "2024-01-01T00:00:00Z",
"scheduled_at": "2024-01-01T00:00:00Z",
"seo_title": "How we improved onboarding",
"seo_description": "A short summary of the post",
"is_draft": false,
"is_scheduled": false,
"is_published": true,
"comments_enabled": true,
"downloads_enabled": true,
"premium": false
}
],
"rooms": [
{}
],
"uncategorised_rooms": [
{}
],
"room_categories": [
{}
],
"channels": [
{}
],
"badges": [
{}
],
"tags": [
{}
],
"topics": [
{}
],
"content_contributors": [
{}
],
"content_share_recipients": [
{}
],
"posters": [
{}
]
}Posts
List posts
Returns a paginated list of posts, optionally filtered by search term. Related records (rooms, channels, badges, tags, topics and contributors) are returned alongside the posts and referenced from each post by id
GET
/
api
/
v1
/
posts
List posts
curl --request GET \
--url https://{host}/api/v1/posts \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/api/v1/posts"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/api/v1/posts', 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://{host}/api/v1/posts",
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: <api-key>"
],
]);
$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://{host}/api/v1/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/v1/posts")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"posts": [
{
"id": 1,
"type": "Post",
"status": "Complete",
"title": "How we improved onboarding",
"content": "The full body of the post",
"author_email": "jane@example.com",
"canonical_url": "https://example.com/posts/how-we-improved-onboarding",
"created_at": "2024-01-01T00:00:00Z",
"introduction": "A short summary of the post",
"thumbnail": "https://example.com/thumbnail.png",
"internal_url": "https://example.com/posts/how-we-improved-onboarding",
"doi": "https://doi.org/10.1000/example",
"published_at": "2024-01-01T00:00:00Z",
"scheduled_at": "2024-01-01T00:00:00Z",
"seo_title": "How we improved onboarding",
"seo_description": "A short summary of the post",
"is_draft": false,
"is_scheduled": false,
"is_published": true,
"comments_enabled": true,
"downloads_enabled": true,
"premium": false
}
],
"rooms": [
{}
],
"uncategorised_rooms": [
{}
],
"room_categories": [
{}
],
"channels": [
{}
],
"badges": [
{}
],
"tags": [
{}
],
"topics": [
{}
],
"content_contributors": [
{}
],
"content_share_recipients": [
{}
],
"posters": [
{}
]
}Authorizations
API authentication using your community API secret. The value below is sent as the Authorization header verbatim, so paste the whole header value including the prefix: Token token=
Query Parameters
Page number (default: 1)
Number of items per page (default: 20)
Search term used to filter results
Response
A page of posts, with the records they refer to

