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}
PATCH/v1/posts/{id}

This request acts on your real account.

curl -X PATCH 'https://api.sofia-post.com/api/v1/posts/{id}' \
  -H "Authorization: Bearer $SOFIA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"scheduledAt":"2026-11-02T10:00:00.000Z"}'

Authorizations

  • Authorizationstringrequired

    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

200application/json

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

402

subscription_required.

403

live_mode_required for a test application, or the posts:write scope is missing.

404

post_not_found: out of reach of the token.

409

post_not_editable: a network has been sent or is being sent.

422application/json

post_refused: a network, the establishment or Publishing would refuse the edited post. duplicate_platform for two targets on one network.

4XXapplication/json

Any other error, in the error envelope.