HivePost API
Menu

Posts

Create a post

POSThttps://hivepost.app/v1/posts

Schedules a post for publish_at, publishes it now when publish_at is left out, or saves a draft with "draft": true. Needs a key that can publish; drafts-only keys get 403 drafts_only unless draft is true. Every account must be on a network open in the API (403 network_not_available) unless it is a draft.

Send an Idempotency-Key header. If the request times out and you send it again with the same key, you get the first answer instead of a second post. How it works

Headers

  • Idempotency-Keystring

    1–255 printable characters. The same key within 24 hours returns the first response.

Body

  • accountsarray of string or objectRequired

    Account ids from GET /v1/accounts, all from one brand. Up to 20 items.

  • textstring

    Up to 10,000 characters.

  • mediaarray of object

    Up to 20 items.

  • publish_atdate-time or null

    With a time zone offset. Left out, the post goes out now.

  • draftboolean

    Default false.

Returns

201 Created.

Errors

StatusCodeWhen
400validation_failedThe body isn't JSON, or the Idempotency-Key header isn't valid (validation_failed).
401unauthorizedNo API key, or one that isn't valid (unauthorized).
403forbidden, drafts_only, network_not_availableThe key can't do this (forbidden, drafts_only), or the network isn't open in the API (network_not_available).
409idempotency_conflictThe Idempotency-Key was used for a different request, or its first request is still running (idempotency_conflict).
413payload_too_largeThe body is over 64 KB (payload_too_large).
422validation_failed, return_url_not_allowed, account_not_connected, text_too_long, media_required, time_in_pastA field is wrong (validation_failed), a connect link's return_url isn't on an allowed domain (return_url_not_allowed), an account needs reconnecting (account_not_connected), or a network refuses the post as it is (e.g. text_too_long, media_required, time_in_past). details lists each problem with the account it is about.
429rate_limitedMore than 60 requests in a minute (rate_limited).
500internal_errorSomething went wrong on our side (internal_error). Safe to retry with the same Idempotency-Key.