curl --request PATCH \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"body": [
"Opening post",
"Reply with an image"
],
"asset_items": [
{
"asset_id": "ast_01JABCDEF",
"item_index": 1
}
]
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}"
payload = {
"body": ["Opening post", "Reply with an image"],
"asset_items": [
{
"asset_id": "ast_01JABCDEF",
"item_index": 1
}
]
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
body: JSON.stringify(['Opening post', 'Reply with an image']),
asset_items: [{asset_id: 'ast_01JABCDEF', item_index: 1}]
})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}', 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/{post}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body' => [
'Opening post',
'Reply with an image'
],
'asset_items' => [
[
'asset_id' => 'ast_01JABCDEF',
'item_index' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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/{post}"
payload := strings.NewReader("{\n \"body\": [\n \"Opening post\",\n \"Reply with an image\"\n ],\n \"asset_items\": [\n {\n \"asset_id\": \"ast_01JABCDEF\",\n \"item_index\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("If-Match", "<if-match>")
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.patch("https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": [\n \"Opening post\",\n \"Reply with an image\"\n ],\n \"asset_items\": [\n {\n \"asset_id\": \"ast_01JABCDEF\",\n \"item_index\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": [\n \"Opening post\",\n \"Reply with an image\"\n ],\n \"asset_items\": [\n {\n \"asset_id\": \"ast_01JABCDEF\",\n \"item_index\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
}
]
}Update Post
Update the content, publishing options, or assets of a draft Post. You can update content and publishing options on a scheduled Post. Cancel its schedule before you change its assets or thread structure. Send the current Post ETag in If-Match.
curl --request PATCH \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"body": [
"Opening post",
"Reply with an image"
],
"asset_items": [
{
"asset_id": "ast_01JABCDEF",
"item_index": 1
}
]
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}"
payload = {
"body": ["Opening post", "Reply with an image"],
"asset_items": [
{
"asset_id": "ast_01JABCDEF",
"item_index": 1
}
]
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
body: JSON.stringify(['Opening post', 'Reply with an image']),
asset_items: [{asset_id: 'ast_01JABCDEF', item_index: 1}]
})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}', 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/{post}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body' => [
'Opening post',
'Reply with an image'
],
'asset_items' => [
[
'asset_id' => 'ast_01JABCDEF',
'item_index' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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/{post}"
payload := strings.NewReader("{\n \"body\": [\n \"Opening post\",\n \"Reply with an image\"\n ],\n \"asset_items\": [\n {\n \"asset_id\": \"ast_01JABCDEF\",\n \"item_index\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("If-Match", "<if-match>")
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.patch("https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": [\n \"Opening post\",\n \"Reply with an image\"\n ],\n \"asset_items\": [\n {\n \"asset_id\": \"ast_01JABCDEF\",\n \"item_index\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/posts/{post}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": [\n \"Opening post\",\n \"Reply with an image\"\n ],\n \"asset_items\": [\n {\n \"asset_id\": \"ast_01JABCDEF\",\n \"item_index\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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.
128The current ETag for the resource. This value prevents an update to an old version.
Path Parameters
Unique workspace ID.
"ws_01JABCDEF"
Unique Post ID.
"send_01JABCDEF"
Body
Draft Post fields to update.
Replacement headline for a draft or scheduled Post.
1 - 10000Replacement copy. X, Bluesky, Mastodon, and Threads accept an empty item when that item has media. Keep the same number of items on a scheduled Post.
1 - 25 elements63206Replacement assets for a draft Post.
100Unique asset ID.
Replacement assets and their body items for a draft Post. Do not use this field with asset_ids.
100Show child attributes
Show child attributes
Replacement Destination publishing options for a draft or scheduled Post.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Response
The updated Post.
Unique Post ID.
"send_01JABCDEF"
"post"A value that groups related posts.
1 - 200^[A-Za-z0-9_-]+$"launch-2026-08"
bluesky, facebook, instagram, threads, mastodon, x, linkedin, tiktok, youtube "x"
draft, preparing, scheduled, ready, processing, awaiting-provider, published, failed, needs-attention, cancelled, missed Whether you can update the Post content. A scheduled Post keeps its assets and thread structure locked.
True when the Post can no longer change state. Poll only while this value and action_required are false.
Whether a person or agent must choose the next action.
"2026-08-09T12:00:00.000Z"
safe, may_duplicate, not_applicable update, delete, publish, cancel, reschedule, retry, retry_with_duplicate_risk x >= 1Show child attributes
Show child attributes
100Unique asset ID.
Unique destination ID.
"dest_01JABCDEF"
"2026-08-09T12:00:00.000Z"
"Europe/Berlin"
now, exact, queue x >= 0The future time when OpenPMM can try the Post again. This value is null after that time.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"2026-08-09T12:00:00.000Z"
"2026-08-09T12:00:00.000Z"
"2026-08-09T12:00:00.000Z"
"2026-08-09T12:00:00.000Z"
"2026-08-09T12:00:00.000Z"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Sanitized attempt history. Present only when include=attempts.
Show child attributes
Show child attributes
