Change a post's time, status, settings or attachments

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-posts-patch"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/eefc4352-9dfe-4039-8382-7cf3e6d19d1f/social-card.svg?v=3e7ae33eec8b" alt="Change a post's time, status, settings or attachments" width="600" height="315"></a>
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

id
string
path
required

Request body

application/json
action
string
draft | schedule | now
scheduledAt
string
targets
object[]
Show child parameters
channelId
string
required
settings
object
required
mediaIds
string[]
text
string
targetIds
string[]
{
  "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
id
string
required
Updated