curl --request POST \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"confirmed": true,
"when": "now",
"time_zone": "Europe/Berlin",
"posts": [
{
"id": "send_01JABCDEF",
"version": 1,
"destination_id": "dest_01JABCDEF"
}
]
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish"
payload = {
"confirmed": True,
"when": "now",
"time_zone": "Europe/Berlin",
"posts": [
{
"id": "send_01JABCDEF",
"version": 1,
"destination_id": "dest_01JABCDEF"
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
confirmed: true,
when: 'now',
time_zone: 'Europe/Berlin',
posts: [{id: 'send_01JABCDEF', version: 1, destination_id: 'dest_01JABCDEF'}]
})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish', 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.openpmm.com/v1/workspaces/{workspace_id}/posts/publish",
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([
'confirmed' => true,
'when' => 'now',
'time_zone' => 'Europe/Berlin',
'posts' => [
[
'id' => 'send_01JABCDEF',
'version' => 1,
'destination_id' => 'dest_01JABCDEF'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish"
payload := strings.NewReader("{\n \"confirmed\": true,\n \"when\": \"now\",\n \"time_zone\": \"Europe/Berlin\",\n \"posts\": [\n {\n \"id\": \"send_01JABCDEF\",\n \"version\": 1,\n \"destination_id\": \"dest_01JABCDEF\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirmed\": true,\n \"when\": \"now\",\n \"time_zone\": \"Europe/Berlin\",\n \"posts\": [\n {\n \"id\": \"send_01JABCDEF\",\n \"version\": 1,\n \"destination_id\": \"dest_01JABCDEF\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirmed\": true,\n \"when\": \"now\",\n \"time_zone\": \"Europe/Berlin\",\n \"posts\": [\n {\n \"id\": \"send_01JABCDEF\",\n \"version\": 1,\n \"destination_id\": \"dest_01JABCDEF\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "post_set",
"group": "launch-2026-08",
"posts": [
{
"id": "send_01JABCDEF",
"object": "post",
"group": "launch-2026-08",
"channel": "x",
"state": "draft",
"editable": true,
"terminal": true,
"action_required": true,
"next_action_at": "2026-08-09T12:00:00.000Z",
"retry_safety": "safe",
"available_actions": [
"update"
],
"version": 2,
"payload": {
"headline": "<string>",
"body": [
"<string>"
],
"destination_options": {
"bluesky": {
"languages": [
"<string>"
],
"content_labels": [
"porn"
],
"alt_text_by_asset_id": {}
}
}
},
"asset_ids": [
"ast_01JABCDEF"
],
"destination_id": "dest_01JABCDEF",
"scheduled_at": "2026-08-09T12:00:00.000Z",
"time_zone": "Europe/Berlin",
"schedule_mode": "now",
"queue_local_date": "2023-12-25",
"queue_window_id": "<string>",
"attempt_count": 1,
"deferred": {
"reason": "publishing_velocity",
"until": "2026-08-09T12:00:00.000Z"
},
"last_error": {
"code": "provider_rejected",
"message": "The provider rejected the post.",
"retryable": true,
"retry_safety": "safe",
"user_action": "retry"
},
"created_at": "2026-08-09T12:00:00.000Z",
"updated_at": "2026-08-09T12:00:00.000Z",
"published_at": "2026-08-09T12:00:00.000Z",
"cancelled_at": "2026-08-09T12:00:00.000Z",
"missed_at": "2026-08-09T12:00:00.000Z",
"receipts": [
{
"id": "rcpt_01JABCDEF",
"object": "receipt",
"item_index": 0,
"provider_object_id": "1844029112345678901",
"url": "<string>",
"state": "published",
"published_at": "2026-08-09T12:00:00.000Z"
}
],
"destination": {
"display_name": "<string>",
"external_id": "<string>",
"profile_image_url": "<string>"
},
"assets": [
{
"id": "ast_01JABCDEF",
"type": "card",
"label": "<string>",
"content_type": "<string>",
"item_index": 1
}
],
"attempts": [
{
"id": "att_01JABCDEF",
"object": "publishing_attempt",
"number": 2,
"trigger": "initial",
"status": "started",
"started_at": "2026-08-09T12:00:00.000Z",
"finished_at": "2026-08-09T12:00:00.000Z",
"retry_safety": "safe",
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"user_action": "retry"
},
"provider": {
"operation": "<string>",
"request_id": "<string>",
"status_code": 349,
"error_code": "<string>",
"subcode": "<string>"
}
}
]
}
]
}Publish Posts
Publish or schedule every draft Post in one group. The operation returns after OpenPMM accepts the state change. It does not wait for provider completion. Active provider work returns 202 and Retry-After. Read each Post while terminal and action_required are both false. Do not send Publish Posts again. The response includes all stored receipts. Each Post keeps its ID. Send explicit confirmation and an idempotency key.
curl --request POST \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"confirmed": true,
"when": "now",
"time_zone": "Europe/Berlin",
"posts": [
{
"id": "send_01JABCDEF",
"version": 1,
"destination_id": "dest_01JABCDEF"
}
]
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish"
payload = {
"confirmed": True,
"when": "now",
"time_zone": "Europe/Berlin",
"posts": [
{
"id": "send_01JABCDEF",
"version": 1,
"destination_id": "dest_01JABCDEF"
}
]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
confirmed: true,
when: 'now',
time_zone: 'Europe/Berlin',
posts: [{id: 'send_01JABCDEF', version: 1, destination_id: 'dest_01JABCDEF'}]
})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish', 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.openpmm.com/v1/workspaces/{workspace_id}/posts/publish",
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([
'confirmed' => true,
'when' => 'now',
'time_zone' => 'Europe/Berlin',
'posts' => [
[
'id' => 'send_01JABCDEF',
'version' => 1,
'destination_id' => 'dest_01JABCDEF'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish"
payload := strings.NewReader("{\n \"confirmed\": true,\n \"when\": \"now\",\n \"time_zone\": \"Europe/Berlin\",\n \"posts\": [\n {\n \"id\": \"send_01JABCDEF\",\n \"version\": 1,\n \"destination_id\": \"dest_01JABCDEF\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirmed\": true,\n \"when\": \"now\",\n \"time_zone\": \"Europe/Berlin\",\n \"posts\": [\n {\n \"id\": \"send_01JABCDEF\",\n \"version\": 1,\n \"destination_id\": \"dest_01JABCDEF\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirmed\": true,\n \"when\": \"now\",\n \"time_zone\": \"Europe/Berlin\",\n \"posts\": [\n {\n \"id\": \"send_01JABCDEF\",\n \"version\": 1,\n \"destination_id\": \"dest_01JABCDEF\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "post_set",
"group": "launch-2026-08",
"posts": [
{
"id": "send_01JABCDEF",
"object": "post",
"group": "launch-2026-08",
"channel": "x",
"state": "draft",
"editable": true,
"terminal": true,
"action_required": true,
"next_action_at": "2026-08-09T12:00:00.000Z",
"retry_safety": "safe",
"available_actions": [
"update"
],
"version": 2,
"payload": {
"headline": "<string>",
"body": [
"<string>"
],
"destination_options": {
"bluesky": {
"languages": [
"<string>"
],
"content_labels": [
"porn"
],
"alt_text_by_asset_id": {}
}
}
},
"asset_ids": [
"ast_01JABCDEF"
],
"destination_id": "dest_01JABCDEF",
"scheduled_at": "2026-08-09T12:00:00.000Z",
"time_zone": "Europe/Berlin",
"schedule_mode": "now",
"queue_local_date": "2023-12-25",
"queue_window_id": "<string>",
"attempt_count": 1,
"deferred": {
"reason": "publishing_velocity",
"until": "2026-08-09T12:00:00.000Z"
},
"last_error": {
"code": "provider_rejected",
"message": "The provider rejected the post.",
"retryable": true,
"retry_safety": "safe",
"user_action": "retry"
},
"created_at": "2026-08-09T12:00:00.000Z",
"updated_at": "2026-08-09T12:00:00.000Z",
"published_at": "2026-08-09T12:00:00.000Z",
"cancelled_at": "2026-08-09T12:00:00.000Z",
"missed_at": "2026-08-09T12:00:00.000Z",
"receipts": [
{
"id": "rcpt_01JABCDEF",
"object": "receipt",
"item_index": 0,
"provider_object_id": "1844029112345678901",
"url": "<string>",
"state": "published",
"published_at": "2026-08-09T12:00:00.000Z"
}
],
"destination": {
"display_name": "<string>",
"external_id": "<string>",
"profile_image_url": "<string>"
},
"assets": [
{
"id": "ast_01JABCDEF",
"type": "card",
"label": "<string>",
"content_type": "<string>",
"item_index": 1
}
],
"attempts": [
{
"id": "att_01JABCDEF",
"object": "publishing_attempt",
"number": 2,
"trigger": "initial",
"status": "started",
"started_at": "2026-08-09T12:00:00.000Z",
"finished_at": "2026-08-09T12:00:00.000Z",
"retry_safety": "safe",
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"user_action": "retry"
},
"provider": {
"operation": "<string>",
"request_id": "<string>",
"status_code": 349,
"error_code": "<string>",
"subcode": "<string>"
}
}
]
}
]
}Authorizations
Send an account API key in the Authorization: Bearer <key> header.
Headers
Optional request ID. OpenPMM returns this value when it is valid. Otherwise, OpenPMM creates a request ID.
128A unique key for this operation. Use the same key when you retry the same request. Different input with the same key returns 409.
1 - 200Path Parameters
Unique workspace ID.
"ws_01JABCDEF"
Body
Draft Posts and destinations to publish.
1 - 100 elementsShow child attributes
Show child attributes
Use now, queue, or an ISO 8601 timestamp with a UTC offset.
now, queue IANA time zone for now or an exact schedule. Omit this field for queue; OpenPMM uses the Workspace time zone.
"Europe/Berlin"
