Skip to content

Guides

Schedule and cancel

Schedule a post for later, move it to another time, cancel it, and hide old posts from your list.

Schedule a post

Add scheduledAt to POST /v1/posts. Use ISO 8601 with Z or an offset. It must be in the future and within 365 days.

curl -X POST "https://api.flenvio.com/v1/posts" \
  -H "x-api-key: $FLENVIO_API_KEY" \
  -H 'Idempotency-Key: 6a1f9d52-0000-4000-8000-000000000004' \
  -H 'Content-Type: application/json' \
  -d '{
  "accountIds": [
    "acc1a000-0000-4000-8000-000000000001",
    "acc1a000-0000-4000-8000-000000000002"
  ],
  "caption": "New single origin from Huila just landed. Bright, juicy, a little floral.",
  "mediaUrls": [
    "https://media.flenvio.example/uploads/5c1f0e2a-0000-4000-8000-000000000001.jpg"
  ],
  "scheduledAt": "2026-10-20T16:00:00Z"
}'
Response · 201
{
  "postId": "b0570000-0000-4000-8000-000000000001",
  "status": "scheduled"
}

The post’s deliveries now show SCHEDULED. The platform rules, media and accounts are checked when you schedule, so a scheduled post isn’t rejected later for breaking them. A delivery can still fail when it publishes, for example if the account needs reconnecting by then or TikTok no longer offers the chosen audience.

GET /v1/posts/{id} · 200
{
  "id": "b0570000-0000-4000-8000-000000000001",
  "caption": "New single origin from Huila just landed. Bright, juicy, a little floral.",
  "mediaUrl": null,
  "mediaUrls": [
    "https://media.flenvio.example/uploads/5c1f0e2a-0000-4000-8000-000000000001.jpg"
  ],
  "scheduledAt": "2026-10-20T16:00:00.000Z",
  "createdAt": "2026-10-12T09:30:00.512Z",
  "logs": [
    {
      "id": "de11e000-0000-4000-8000-000000000001",
      "status": "SCHEDULED",
      "errorMessage": null,
      "platformPostId": null,
      "remoteDeletedAt": null,
      "updatedAt": "2026-10-12T09:30:00.514Z",
      "connectedAccount": {
        "id": "acc1a000-0000-4000-8000-000000000001",
        "platform": "INSTAGRAM",
        "accountName": "lumen.coffee"
      }
    },
    {
      "id": "de11e000-0000-4000-8000-000000000002",
      "status": "SCHEDULED",
      "errorMessage": null,
      "platformPostId": null,
      "remoteDeletedAt": null,
      "updatedAt": "2026-10-12T09:30:00.514Z",
      "connectedAccount": {
        "id": "acc1a000-0000-4000-8000-000000000002",
        "platform": "FACEBOOK",
        "accountName": "Lumen Coffee Roasters"
      }
    }
  ],
  "mediaPreviews": [
    {
      "url": "https://media.flenvio.example/uploads/5c1f0e2a-0000-4000-8000-000000000001.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900&X-Amz-Signature=…",
      "kind": "image"
    }
  ]
}

Move it to another time

curl -X POST "https://api.flenvio.com/v1/posts/b0570000-0000-4000-8000-000000000001/reschedule" \
  -H "x-api-key: $FLENVIO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "scheduledAt": "2026-10-21T08:30:00Z"
}'
Response · 200
{
  "rescheduled": 2,
  "scheduledAt": "2026-10-21T08:30:00.000Z"
}

Only deliveries still SCHEDULED move; rescheduled says how many. If none are left (they already published, or the post was canceled) you get 400 This post has no scheduled deliveries left to reschedule.

Cancel it

curl -X POST "https://api.flenvio.com/v1/posts/b0570000-0000-4000-8000-000000000001/cancel" \
  -H "x-api-key: $FLENVIO_API_KEY"
Response · 200
{
  "canceled": 2,
  "alreadyPublishing": 0
}
  • canceled: deliveries that were scheduled and now won’t publish (CANCELED).
  • alreadyPublishing: deliveries that had already started and can’t be stopped. They’ll finish as usual.
  • Calling it again returns 400 This post has no scheduled deliveries left to cancel.
  • Canceling is final. To publish the same content later, create a new post.

Change the text or media

Posts can’t be edited. Cancel the scheduled post and create a new one with the changes (and a new idempotency key).

Hide old posts from your list

Archiving hides a post from GET /v1/posts (and from Posts in the dashboard). Nothing is deleted from the platforms, and the post is still available by id. A post with scheduled deliveries must be canceled first.

curl -X POST "https://api.flenvio.com/v1/posts/b0570000-0000-4000-8000-000000000001/archive" \
  -H "x-api-key: $FLENVIO_API_KEY"
Response · 201
{
  "archived": true
}
Archiving a scheduled post · 409
{
  "message": "This post is still scheduled. Cancel it first; archiving only hides posts from the list.",
  "error": "Conflict",
  "statusCode": 409
}
Schedule and cancel · Flenvio API · Flenvio