Posts
Fetch a single post with its publish attempts
Returns the post row plus every publish attempt (start/finish, success flag, upstream response, error code). Use the postId returned in CreatePostResponse.results[] as {id}.
GET
/
v1
/
posts
/
{id}
Fetch a single post with its publish attempts
curl --request GET \
--url https://api.letmepost.dev/v1/posts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.letmepost.dev/v1/posts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.letmepost.dev/v1/posts/{id}', 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.letmepost.dev/v1/posts/{id}",
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.letmepost.dev/v1/posts/{id}"
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.letmepost.dev/v1/posts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.letmepost.dev/v1/posts/{id}")
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{
"id": "<string>",
"profileId": "<string>",
"accountId": "<string>",
"account": {
"id": "<string>",
"platform": "bluesky",
"platformAccountId": "<string>",
"displayName": "<string>"
},
"platform": "bluesky",
"status": "queued",
"text": "<string>",
"mediaRefs": [
"<unknown>"
],
"scheduledAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"platformUri": "<string>",
"platformCid": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attempts": [
{
"id": "<string>",
"attemptNumber": 2,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"succeeded": true,
"errorCode": "<string>",
"errorMessage": "<string>",
"platformResponse": "<unknown>"
}
],
"error": "<unknown>"
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}Authorizations
Mint an API key in the dashboard. See https://letmepost.dev/docs/authentication/.
Path Parameters
Response
Post detail with attempts.
A single per-target post row from the post log.
Show child attributes
Show child attributes
Supported platforms. tiktok posts upload to the creator's TikTok inbox as a draft that the creator confirms in the TikTok app; Direct Post is not implemented yet.
Available options:
bluesky, facebook, instagram, linkedin, pinterest, threads, tiktok, twitter Lifecycle state of a single per-target post row. canceled is the terminal state reached via DELETE /v1/posts/{id} on a queued scheduled post.
Available options:
queued, validated, publishing, published, failed, rejected, canceled Show child attributes
Show child attributes
Was this page helpful?
⌘I
Fetch a single post with its publish attempts
curl --request GET \
--url https://api.letmepost.dev/v1/posts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.letmepost.dev/v1/posts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.letmepost.dev/v1/posts/{id}', 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.letmepost.dev/v1/posts/{id}",
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.letmepost.dev/v1/posts/{id}"
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.letmepost.dev/v1/posts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.letmepost.dev/v1/posts/{id}")
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{
"id": "<string>",
"profileId": "<string>",
"accountId": "<string>",
"account": {
"id": "<string>",
"platform": "bluesky",
"platformAccountId": "<string>",
"displayName": "<string>"
},
"platform": "bluesky",
"status": "queued",
"text": "<string>",
"mediaRefs": [
"<unknown>"
],
"scheduledAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"platformUri": "<string>",
"platformCid": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attempts": [
{
"id": "<string>",
"attemptNumber": 2,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"succeeded": true,
"errorCode": "<string>",
"errorMessage": "<string>",
"platformResponse": "<unknown>"
}
],
"error": "<unknown>"
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}{
"error": {
"code": "preflight_failed",
"message": "Bluesky posts are capped at 300 graphemes; this body is 312.",
"rule": "bluesky.text.max_graphemes",
"platform": "bluesky",
"remediation": "Trim 12 graphemes, or split into a thread.",
"docUrl": "https://docs.letmepost.dev/errors/preflight_failed",
"ruleUrl": "https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes",
"requestId": "req_01HY6X4AWBJM2K9F2PTQMRD9JQ"
}
}
