Skip to main content
PUT
/
api
/
calendar
/
posts
/
{postId}
Update a single social post
curl --request PUT \
  --url https://app.puffle.ai/api/calendar/posts/{postId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "content": "<string>",
  "hashtags": [
    "<string>"
  ],
  "channels": [
    "<string>"
  ],
  "scheduled_at": "2023-11-07T05:31:56Z",
  "account_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "status": "draft",
  "media_items": [
    {
      "url": "<string>",
      "type": "image"
    }
  ]
}
'
{
  "post": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "calendar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "content": "<string>",
    "hashtags": [
      "<string>"
    ],
    "channels": [
      "<string>"
    ],
    "scheduled_at": "2023-11-07T05:31:56Z",
    "account_ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "status": "draft",
    "late_post_id": "<string>",
    "media_items": [
      {
        "url": "<string>",
        "type": "image"
      }
    ],
    "archived_at": "2023-11-07T05:31:56Z"
  }
}

Overview

Update a post identified by path param. The handler mirrors changes into Late: creates, updates, or deletes the Late post depending on whether accounts and content remain valid. If account_ids changes, the old Late post is deleted and a fresh one is created because Late binds posts to specific account profiles.

AI agent notes

Fields replace, not merge. Omitting media_items is treated the same as passing [] — this clears attachments on Late’s side.Validation:
  • Scheduling into the past is blocked for non-draft statuses
  • content is validated upstream but not required at this endpoint — be defensive
After updating, late_post_id may change if the account set changed. Re-read via getSocialPost if you need the fresh value.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

postId
string<uuid>
required

Post UUID. Must belong to the caller's calendar.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json

Values replace the existing post fields (not partial-merge on arrays). When account_ids changes, the server deletes and recreates the Late post because Late binds posts to specific account profiles.

title
string | null
content
string
hashtags
string[]
channels
string[]
scheduled_at
string<date-time> | null

ISO timestamp. Required for status: 'scheduled'.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
account_ids
string<uuid>[]
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
status
enum<string>
Available options:
draft,
scheduled,
posted
media_items
object[]

Full replacement. Send [] to clear all attachments; omit to also clear.

Response

Post updated.

post
object
required