Socials

Publish a post now

Changed on

Publishes a draft post immediately, or sends a failed post again. A failed post goes out as a new submission and counts against today's post limit. Edit it first with PATCH /socials/posts/{id} to fix what made it fail. With queue: true it is scheduled in the next free posting time instead.

post/socials/posts/{id}/publish

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

Resource ID

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

object required
queue, boolean

Schedule the post in the next free posting time set with PUT /socials/queue instead of publishing it now. Answers 422 with code social_queue_empty when no posting time is free.

Response

Post

SocialPost required
object, string required
id, string required
title, string nullable required
content, string required
platforms, object required
platform_data, object required
account_ids, string[] required

The connected accounts (sacct_...) it goes out on. Empty means the only connected account on each of its platforms; a platform with several needs its ids named.

upload_ids, unknown[] required
media_urls, unknown[] required
status, 'draft' | 'publishing' | 'scheduled' | 'posted' | 'partial' | 'failed' | 'disconnected' required
scheduled_at, string date-time nullable required
posted_at, string date-time nullable required
error, string nullable required
targets, object[] required

Each account the post went out to and how it fared there; empty until it is sent. A post that went live on some accounts and failed on the rest has status partial, and error names the accounts that failed.

analytics, object required
created_at, string date-time required
updated_at, string date-time required
warnings, string[]

Only in the reply to creating or editing a draft, and only when there is something to fix: the problems it would hit going out, such as missing media or a platform with no connected account.

Changes

    • warning

      added the new partial enum value to the status response property for the response status

    • info

      added the required property targets to the response with the status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    8 more changes in this revision