curl --request POST \
--url https://www.postbase.so/api/v1/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "Launching today π",
"channel_ids": [
"<channel-id>"
],
"scheduled_at": "2026-10-01T09:00:00+01:00"
}
'import requests
url = "https://www.postbase.so/api/v1/posts"
payload = {
"body": "Launching today π",
"channel_ids": ["<channel-id>"],
"scheduled_at": "2026-10-01T09:00:00+01:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('Launching today π'),
channel_ids: ['<channel-id>'],
scheduled_at: '2026-10-01T09:00:00+01:00'
})
};
fetch('https://www.postbase.so/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://www.postbase.so/api/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => 'Launching today π',
'channel_ids' => [
'<channel-id>'
],
'scheduled_at' => '2026-10-01T09:00:00+01:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.postbase.so/api/v1/posts"
payload := strings.NewReader("{\n \"body\": \"Launching today π\",\n \"channel_ids\": [\n \"<channel-id>\"\n ],\n \"scheduled_at\": \"2026-10-01T09:00:00+01:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.postbase.so/api/v1/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"Launching today π\",\n \"channel_ids\": [\n \"<channel-id>\"\n ],\n \"scheduled_at\": \"2026-10-01T09:00:00+01:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.postbase.so/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"Launching today π\",\n \"channel_ids\": [\n \"<channel-id>\"\n ],\n \"scheduled_at\": \"2026-10-01T09:00:00+01:00\"\n}"
response = http.request(request)
puts response.read_body{
"post": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"body": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"media": 123,
"warning": "<string>",
"idempotent_replay": true
}
}{
"post": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"body": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"media": 123,
"warning": "<string>",
"idempotent_replay": true
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Create a post
Save a draft, or schedule a post or thread. Send an Idempotency-Key so a retry canβt post twice.
curl --request POST \
--url https://www.postbase.so/api/v1/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "Launching today π",
"channel_ids": [
"<channel-id>"
],
"scheduled_at": "2026-10-01T09:00:00+01:00"
}
'import requests
url = "https://www.postbase.so/api/v1/posts"
payload = {
"body": "Launching today π",
"channel_ids": ["<channel-id>"],
"scheduled_at": "2026-10-01T09:00:00+01:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('Launching today π'),
channel_ids: ['<channel-id>'],
scheduled_at: '2026-10-01T09:00:00+01:00'
})
};
fetch('https://www.postbase.so/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://www.postbase.so/api/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => 'Launching today π',
'channel_ids' => [
'<channel-id>'
],
'scheduled_at' => '2026-10-01T09:00:00+01:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.postbase.so/api/v1/posts"
payload := strings.NewReader("{\n \"body\": \"Launching today π\",\n \"channel_ids\": [\n \"<channel-id>\"\n ],\n \"scheduled_at\": \"2026-10-01T09:00:00+01:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.postbase.so/api/v1/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"Launching today π\",\n \"channel_ids\": [\n \"<channel-id>\"\n ],\n \"scheduled_at\": \"2026-10-01T09:00:00+01:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.postbase.so/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"Launching today π\",\n \"channel_ids\": [\n \"<channel-id>\"\n ],\n \"scheduled_at\": \"2026-10-01T09:00:00+01:00\"\n}"
response = http.request(request)
puts response.read_body{
"post": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"body": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"media": 123,
"warning": "<string>",
"idempotent_replay": true
}
}{
"post": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"body": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"media": 123,
"warning": "<string>",
"idempotent_replay": true
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
A pb_live_ API key
Headers
Repeat a request with the same key to get the first post back instead of a new one.
255Body
The post text, for a single post.
Several posts to publish as a thread, in order. Takes precedence over body.
Channels to publish to, from GET /channels.
Text for particular channels instead of body, keyed by channel id. Each is a single post.
Show child attributes
Show child attributes
When to publish: ISO 8601 with Z or an offset (2026-10-01T09:00:00+01:00). Omit or null to save a draft.
Publish this many minutes from now, on the server's clock. Instead of scheduled_at.
Files from GET /media to attach, in order.
Public https links to images or a video, attached after media_ids. Each is downloaded into the media library (up to 10 per request, 200 MB each).
10Show child attributes
Show child attributes
Same as the Idempotency-Key header.
255Response
A repeat of an earlier request (same idempotency key)
Show child attributes
Show child attributes