List posts
curl --request GET \
--url https://api.dev.postinger.dev/public/v1/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dev.postinger.dev/public/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dev.postinger.dev/public/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://api.dev.postinger.dev/public/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: 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://api.dev.postinger.dev/public/v1/posts"
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://api.dev.postinger.dev/public/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.postinger.dev/public/v1/posts")
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{
"data": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"content": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"targets": [
{
"socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "instagram",
"handle": "<string>",
"contentOverride": "<string>",
"options": {
"format": "feed",
"shareToFeed": true,
"link": "<string>",
"youtubeTitle": "<string>",
"youtubeDescription": "<string>",
"youtubePrivacy": "private",
"youtubeMadeForKids": true,
"youtubeTags": [
"<string>"
],
"tiktokMode": "direct",
"tiktokCaption": "<string>",
"tiktokPrivacy": "PUBLIC_TO_EVERYONE",
"tiktokAllowComment": true,
"tiktokAllowDuet": true,
"tiktokAllowStitch": true,
"tiktokDisclose": true,
"tiktokBrandContent": true,
"tiktokBrandOrganic": true,
"tiktokIsAigc": true
},
"status": "pending",
"externalPostId": "<string>",
"error": "<string>",
"waitReason": "<string>",
"nextAttemptAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "image",
"url": "<string>",
"posterUrl": "<string>",
"sourceAvailable": true,
"contentType": "<string>",
"width": 123,
"height": 123,
"durationSeconds": 123
}
]
}
],
"nextCursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}Posts
List posts
Required permissions: posts-read. Returns data.items and data.nextCursor. Send nextCursor as after on the next request; the final full page may be followed by an empty page. For backward navigation send the first visible post ID as before. Use after or before, never both. Keep filters and sort unchanged. Default sort is schedule_desc; unscheduled posts come last in both schedule sorts. Creation time and ID break ties.
GET
/
posts
List posts
curl --request GET \
--url https://api.dev.postinger.dev/public/v1/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dev.postinger.dev/public/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dev.postinger.dev/public/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://api.dev.postinger.dev/public/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: 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://api.dev.postinger.dev/public/v1/posts"
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://api.dev.postinger.dev/public/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.postinger.dev/public/v1/posts")
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{
"data": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"content": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"targets": [
{
"socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "instagram",
"handle": "<string>",
"contentOverride": "<string>",
"options": {
"format": "feed",
"shareToFeed": true,
"link": "<string>",
"youtubeTitle": "<string>",
"youtubeDescription": "<string>",
"youtubePrivacy": "private",
"youtubeMadeForKids": true,
"youtubeTags": [
"<string>"
],
"tiktokMode": "direct",
"tiktokCaption": "<string>",
"tiktokPrivacy": "PUBLIC_TO_EVERYONE",
"tiktokAllowComment": true,
"tiktokAllowDuet": true,
"tiktokAllowStitch": true,
"tiktokDisclose": true,
"tiktokBrandContent": true,
"tiktokBrandOrganic": true,
"tiktokIsAigc": true
},
"status": "pending",
"externalPostId": "<string>",
"error": "<string>",
"waitReason": "<string>",
"nextAttemptAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "image",
"url": "<string>",
"posterUrl": "<string>",
"sourceAvailable": true,
"contentType": "<string>",
"width": 123,
"height": 123,
"durationSeconds": 123
}
]
}
],
"nextCursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"meta": {
"requestId": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
draft, scheduled, publishing, partial, published, failed Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Available options:
schedule_desc, schedule_asc, newest, oldest Required range:
1 <= x <= 100Required string length:
1 - 200Available options:
instagram, facebook, youtube, tiktok Was this page helpful?