Media
Add a photo or video by link
POST
https://hivepost.app/v1/mediaHivePost downloads the file in the background; it starts as importing. You can use its id in POST /v1/posts right away: the post waits for the file. In test mode the file is not downloaded and comes back ready.
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 file. How it works
Headers
Idempotency-Keystring1–255 printable characters. The same key within 24 hours returns the first response.
Body
urlstringRequiredA public http or https link.
brand_idstringNeeded when the workspace has more than one brand.
alt_textstringUp to 2,000 characters.
Returns
201 Created.
Errors
| Status | Code | When |
|---|---|---|
| 400 | validation_failed | The body isn't JSON, or the Idempotency-Key header isn't valid (validation_failed). |
| 401 | unauthorized | No API key, or one that isn't valid (unauthorized). |
| 403 | forbidden, drafts_only, network_not_available | The key can't do this (forbidden, drafts_only), or the network isn't open in the API (network_not_available). |
| 409 | idempotency_conflict | The Idempotency-Key was used for a different request, or its first request is still running (idempotency_conflict). |
| 413 | payload_too_large | The body is over 64 KB (payload_too_large). |
| 422 | validation_failed, return_url_not_allowed, account_not_connected, text_too_long, media_required, time_in_past | A 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. |
| 429 | rate_limited | More than 60 requests in a minute (rate_limited). |
| 500 | internal_error | Something went wrong on our side (internal_error). Safe to retry with the same Idempotency-Key. |