Update a post
curl --request PUT \
--url https://{domain}/os/api/{workspace}/posts/{post} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"versions": [
{
"account_id": 0,
"is_original": true,
"content": [
{
"body": "Our autumn sale starts today!",
"url": "<string>",
"media": [
123
]
}
],
"options": {}
}
],
"accounts": [
12
],
"tags": [
123
],
"date": "2026-10-20",
"time": "09:00"
}
'import requests
url = "https://{domain}/os/api/{workspace}/posts/{post}"
payload = {
"versions": [
{
"account_id": 0,
"is_original": True,
"content": [
{
"body": "Our autumn sale starts today!",
"url": "<string>",
"media": [123]
}
],
"options": {}
}
],
"accounts": [12],
"tags": [123],
"date": "2026-10-20",
"time": "09:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
versions: [
{
account_id: 0,
is_original: true,
content: [
{
body: JSON.stringify('Our autumn sale starts today!'),
url: '<string>',
media: [123]
}
],
options: {}
}
],
accounts: [12],
tags: [123],
date: '2026-10-20',
time: '09:00'
})
};
fetch('https://{domain}/os/api/{workspace}/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://{domain}/os/api/{workspace}/posts/{post}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'versions' => [
[
'account_id' => 0,
'is_original' => true,
'content' => [
[
'body' => 'Our autumn sale starts today!',
'url' => '<string>',
'media' => [
123
]
]
],
'options' => [
]
]
],
'accounts' => [
12
],
'tags' => [
123
],
'date' => '2026-10-20',
'time' => '09: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://{domain}/os/api/{workspace}/posts/{post}"
payload := strings.NewReader("{\n \"versions\": [\n {\n \"account_id\": 0,\n \"is_original\": true,\n \"content\": [\n {\n \"body\": \"Our autumn sale starts today!\",\n \"url\": \"<string>\",\n \"media\": [\n 123\n ]\n }\n ],\n \"options\": {}\n }\n ],\n \"accounts\": [\n 12\n ],\n \"tags\": [\n 123\n ],\n \"date\": \"2026-10-20\",\n \"time\": \"09:00\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{domain}/os/api/{workspace}/posts/{post}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"versions\": [\n {\n \"account_id\": 0,\n \"is_original\": true,\n \"content\": [\n {\n \"body\": \"Our autumn sale starts today!\",\n \"url\": \"<string>\",\n \"media\": [\n 123\n ]\n }\n ],\n \"options\": {}\n }\n ],\n \"accounts\": [\n 12\n ],\n \"tags\": [\n 123\n ],\n \"date\": \"2026-10-20\",\n \"time\": \"09:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/os/api/{workspace}/posts/{post}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"versions\": [\n {\n \"account_id\": 0,\n \"is_original\": true,\n \"content\": [\n {\n \"body\": \"Our autumn sale starts today!\",\n \"url\": \"<string>\",\n \"media\": [\n 123\n ]\n }\n ],\n \"options\": {}\n }\n ],\n \"accounts\": [\n 12\n ],\n \"tags\": [\n 123\n ],\n \"date\": \"2026-10-20\",\n \"time\": \"09:00\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Posts
Update a post
Replaces the post’s accounts, tags, date, time and versions. date and time use the workspace’s timezone. To schedule, call Schedule a post afterwards. A non-draft post with no accounts or no date and time goes back to draft.
Required permission: publishing:posts:write, plus publishing:posts:publish if the post is scheduled or you send a date and time.
PUT
/
{workspace}
/
posts
/
{post}
Update a post
curl --request PUT \
--url https://{domain}/os/api/{workspace}/posts/{post} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"versions": [
{
"account_id": 0,
"is_original": true,
"content": [
{
"body": "Our autumn sale starts today!",
"url": "<string>",
"media": [
123
]
}
],
"options": {}
}
],
"accounts": [
12
],
"tags": [
123
],
"date": "2026-10-20",
"time": "09:00"
}
'import requests
url = "https://{domain}/os/api/{workspace}/posts/{post}"
payload = {
"versions": [
{
"account_id": 0,
"is_original": True,
"content": [
{
"body": "Our autumn sale starts today!",
"url": "<string>",
"media": [123]
}
],
"options": {}
}
],
"accounts": [12],
"tags": [123],
"date": "2026-10-20",
"time": "09:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
versions: [
{
account_id: 0,
is_original: true,
content: [
{
body: JSON.stringify('Our autumn sale starts today!'),
url: '<string>',
media: [123]
}
],
options: {}
}
],
accounts: [12],
tags: [123],
date: '2026-10-20',
time: '09:00'
})
};
fetch('https://{domain}/os/api/{workspace}/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://{domain}/os/api/{workspace}/posts/{post}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'versions' => [
[
'account_id' => 0,
'is_original' => true,
'content' => [
[
'body' => 'Our autumn sale starts today!',
'url' => '<string>',
'media' => [
123
]
]
],
'options' => [
]
]
],
'accounts' => [
12
],
'tags' => [
123
],
'date' => '2026-10-20',
'time' => '09: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://{domain}/os/api/{workspace}/posts/{post}"
payload := strings.NewReader("{\n \"versions\": [\n {\n \"account_id\": 0,\n \"is_original\": true,\n \"content\": [\n {\n \"body\": \"Our autumn sale starts today!\",\n \"url\": \"<string>\",\n \"media\": [\n 123\n ]\n }\n ],\n \"options\": {}\n }\n ],\n \"accounts\": [\n 12\n ],\n \"tags\": [\n 123\n ],\n \"date\": \"2026-10-20\",\n \"time\": \"09:00\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{domain}/os/api/{workspace}/posts/{post}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"versions\": [\n {\n \"account_id\": 0,\n \"is_original\": true,\n \"content\": [\n {\n \"body\": \"Our autumn sale starts today!\",\n \"url\": \"<string>\",\n \"media\": [\n 123\n ]\n }\n ],\n \"options\": {}\n }\n ],\n \"accounts\": [\n 12\n ],\n \"tags\": [\n 123\n ],\n \"date\": \"2026-10-20\",\n \"time\": \"09:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/os/api/{workspace}/posts/{post}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"versions\": [\n {\n \"account_id\": 0,\n \"is_original\": true,\n \"content\": [\n {\n \"body\": \"Our autumn sale starts today!\",\n \"url\": \"<string>\",\n \"media\": [\n 123\n ]\n }\n ],\n \"options\": {}\n }\n ],\n \"accounts\": [\n 12\n ],\n \"tags\": [\n 123\n ],\n \"date\": \"2026-10-20\",\n \"time\": \"09:00\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
bearerAuthapiKeyHeader
A workspace API key: Authorization: Bearer osk_...
Path Parameters
Your workspace UUID. Must match the API key's workspace.
Post UUID.
Body
application/json
Response
200 - application/json
Success