List posts
curl --request GET \
--url https://postmesh.app/api/v1/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://postmesh.app/api/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://postmesh.app/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://postmesh.app/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: 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://postmesh.app/api/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://postmesh.app/api/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://postmesh.app/api/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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"platforms": [
"<string>"
],
"text": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"text_cut": true,
"scheduled_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "app",
"error": "<string>",
"accounts": [
{
"platform": "<string>",
"result": "posted",
"account_id": "<string>",
"username": "<string>",
"url": "<string>",
"error": "<string>"
}
],
"label_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"next_cursor": "<string>",
"total": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}Posts
List posts
Your posts a page at a time: newest first, or soonest first for scheduled ones. Pass next_cursor as cursor for the next page.
Needs an API key with the read scope.
GET
/
posts
List posts
curl --request GET \
--url https://postmesh.app/api/v1/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://postmesh.app/api/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://postmesh.app/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://postmesh.app/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: 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://postmesh.app/api/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://postmesh.app/api/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://postmesh.app/api/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": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"platforms": [
"<string>"
],
"text": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"text_cut": true,
"scheduled_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "app",
"error": "<string>",
"accounts": [
{
"platform": "<string>",
"result": "posted",
"account_id": "<string>",
"username": "<string>",
"url": "<string>",
"error": "<string>"
}
],
"label_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"next_cursor": "<string>",
"total": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}{
"error": "<string>",
"code": "<string>",
"field": "<string>",
"retry_after": 0
}Authorizations
An API key from Settings, API & MCP: pm_live_...
Query Parameters
all when left out.
Available options:
all, scheduled, sent, failed, cancelled A network PostMesh posts to.
Available options:
twitter, youtube, instagram, tiktok, threads, facebook, linkedin, reddit, bluesky, mastodon, telegram, discord Only posts with this label.
Words in the caption.
Maximum string length:
200Start of a window, a date or date-time, inclusive.
Maximum string length:
64End of the window, exclusive. At most 366 days after from.
Maximum string length:
641 to 50, 20 when left out.
Required range:
1 <= x <= 50next_cursor from the page before.
Maximum string length:
512true counts every post the filters match (first page only).
Available options:
true, false Was this page helpful?