PostsEdit a post

Posts

Edit a post

Before any network has started sending, replaces targets, sets scheduledAt or moves the post between draft and scheduled. Omitted fields are kept.

PATCHhttps://api.sofia-post.com/api/v1/posts/{id}
PATCHhttps://api.sofia-post.com/api/v1/posts/{id}

Edit a post

Before any network has started sending, replaces targets, sets scheduledAt or moves the post between draft and scheduled. Omitted fields are kept.

Authorizations

Authorizationstringrequired

Your personal key or OAuth access token, sent as Bearer <token>.

Kept in this tab only, and sent only to api.sofia-post.com. Get an API key

Path parameters

idstringrequired

Identifier of the post.

Body

This request acts on your real account.

PATCH /v1/posts/{id} rewrites the targets, moves scheduledAt or changes status: draft removes the schedule and keeps the content, scheduled reschedules it. Once a network has sent the post, the response is 409 post_not_editable.

curl -X PATCH https://api.sofia-post.com/api/v1/posts/$POST_ID \
  -H "Authorization: Bearer $SOFIA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"status":"scheduled","scheduledAt":"2026-11-20T09:00:00Z"}'

Authorizations

  • Authorizationstringheaderrequired

    Your personal key or OAuth access token, sent as Bearer <token>.

Path parameters

  • idstringrequired

    Identifier of the post.

Body

application/json
  • targetsobject[]

    All the targets, rewritten (text, media, format, account); absent: kept

    Show child attributes
    • platformstringrequired

      Targeted network

      Allowed values: instagramfacebookxlinkedintiktok

    • textstringrequired

      Caption published on this network

    • mediaobject[]

      Attached media

      Show child attributes
      • idstring

        Identifier of a media of the establishment library (otherwise url and type)

      • urlstring

        Public address of the media (https in live); without an identifier

      • typestring

        Kind of the media given by address

        Allowed values: imagevideo

    • formatstring

      Format (post, reel, story, carousel...); by default, the one the network would serve

    • accountIdstring

      Live: the connected account that publishes, when the establishment has several on this network (GET /v1/establishments/:id/accounts)

  • scheduledAtstring<date-time>

    New date, in the future: the post is scheduled at this date

  • statusstring

    draft: back to draft (keeps the content, loses the time); scheduled: schedule at scheduledAt, or at the time it had

    Allowed values: draftscheduled

Response

The post after the edit.

  • idstringrequired

    Identifier of the post

  • statusstringrequired

    Across all networks; partial: published on one, failed on another

    Allowed values: draftscheduledpublishingpublishedsent_to_inboxfailedpartial

  • establishmentIdstringrequired

    Establishment of the post

  • createdAtstring<date-time>required

    When the post was created

  • targetsobject[]required

    One entry per network and account: two accounts on one network, two entries

    Show child attributes
    • platformstringrequired

      Network of the target

    • accountIdstringrequired

      The account that publishes (GET /v1/establishments/:id/accounts)

    • statestringrequired

      State of the target on its network

      Allowed values: draftscheduledpublishingpublishedsent_to_inboxfailed

    • publishedAtstring<date-time>

      When the target was published

    • permalinkstring

      Link to the published post on the network

    • errorstring

      Why the network refused

  • scheduledAtstring<date-time>

    When the post is scheduled to be published

Was this page helpful?