Change a post's time, status, settings or attachments
PATCH
http://localhost:4000/api/v1 /posts/{id} Send only what changes. scheduledAt moves the post; action is as in POST /posts (draft takes it off the schedule, schedule and now need the posts:publish scope) and defaults to what the post is now; targets[].settings replaces the settings of that channel; mediaIds replaces the attachments of the first part and text its text. With targetIds (ids of the post's targets), text and mediaIds change only those channels' copies: each gets a text of its own and the others keep theirs. The channels, tags and client stay as they are. Every check of POST /posts applies, and only drafts and scheduled posts can be changed.
Parameters
idstring
path
required
Request body
application/json
actionstring
scheduledAtstring
targetsobject[]
Show child parameters
channelIdstring
required
settingsobject
required
mediaIdsstring[]
textstring
targetIdsstring[]
{
"action": "draft",
"scheduledAt": "2024-01-01T00:00:00Z",
"targets": [
{
"channelId": "string",
"settings": {}
}
],
"mediaIds": [
"string"
],
"text": "string",
"targetIds": [
"string"
]
}Code samples
cURL
curl -X PATCH "http://localhost:4000/api/v1/posts/{id}" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"draft","scheduledAt":"2024-01-01T00:00:00Z","targets":[{"channelId":"string","settings":{}}],"mediaIds":["string"],"text":"string","targetIds":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{
"id": "string"
}Schema
idstring
required
Updated