Get post preview
curl --request GET \
--url https://app.trypost.it/api/posts/{post}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trypost.it/api/posts/{post}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trypost.it/api/posts/{post}/preview', 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://app.trypost.it/api/posts/{post}/preview",
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://app.trypost.it/api/posts/{post}/preview"
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://app.trypost.it/api/posts/{post}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trypost.it/api/posts/{post}/preview")
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{
"post_id": "9d3c1f2a-6b4e-4c8a-9f1e-2a7b5c8d0e41",
"original_content": "We just shipped scheduled threads. Here is how they work.",
"original_length": 57,
"platforms": [
{
"post_platform_id": "9d3c1f2b-1a2b-4c3d-8e4f-5a6b7c8d9e10",
"platform": "x",
"content_type": "x_post",
"sanitized_content": "We just shipped scheduled threads. Here is how they work.",
"sanitized_length": 57,
"max_content_length": 280,
"truncated": false,
"thread_replies": [
{
"text": "2/ Replies publish under the first post.",
"media": []
}
]
}
]
}{
"message": "Unauthenticated."
}{
"message": "Active subscription required."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}Posts
Get post preview
Shows the text each enabled destination will send, after the network’s formatting rules, and its length against the account’s limit. Nothing is published.
GET
/
posts
/
{post}
/
preview
Get post preview
curl --request GET \
--url https://app.trypost.it/api/posts/{post}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trypost.it/api/posts/{post}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trypost.it/api/posts/{post}/preview', 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://app.trypost.it/api/posts/{post}/preview",
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://app.trypost.it/api/posts/{post}/preview"
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://app.trypost.it/api/posts/{post}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trypost.it/api/posts/{post}/preview")
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{
"post_id": "9d3c1f2a-6b4e-4c8a-9f1e-2a7b5c8d0e41",
"original_content": "We just shipped scheduled threads. Here is how they work.",
"original_length": 57,
"platforms": [
{
"post_platform_id": "9d3c1f2b-1a2b-4c3d-8e4f-5a6b7c8d9e10",
"platform": "x",
"content_type": "x_post",
"sanitized_content": "We just shipped scheduled threads. Here is how they work.",
"sanitized_length": 57,
"max_content_length": 280,
"truncated": false,
"thread_replies": [
{
"text": "2/ Replies publish under the first post.",
"media": []
}
]
}
]
}{
"message": "Unauthenticated."
}{
"message": "Active subscription required."
}{
"message": "<string>"
}{
"message": "<string>"
}{
"name": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 30 seconds."
}Authorizations
Workspace API key from Settings → API Keys.
Path Parameters
Post id. A post of another workspace returns 404.

