Hanzo
OpenapiSocial

Publishes the post immediately to the connected accounts on its channel and…

Publishes the post immediately to the connected accounts on its channel and answers with the updated row, carrying the account and external id it…

POST /v1/social/posts/{id}/publish

Addresshttps://api.hanzo.ai/v1/social/posts/{id}/publish
MethodPOST
Operationpost_social_posts_by_id_publish
AuthAuthorization: Bearer $HANZO_API_KEY

Publishes the post immediately to the connected accounts on its channel and answers with the updated row, carrying the account and external id it published under.

It is IDEMPOTENT: a post that has already published, or that another caller is publishing right now, comes back unchanged rather than being posted twice. That claim is taken before any network call, which is what makes a double submit safe.

The two failure shapes differ on purpose. Having no connected account for the channel is the caller's to fix, so it is recorded ON the post as failed with the reason and answers normally. A deployment that lacks the network's own credentials cannot publish for anyone, so that is a 503 naming exactly what is missing.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the account or post to act on, taken from the path.

Response

StatusBodyMeaning
200socialPostok

200 body — 11 fields.

FieldInTypeAlwaysDescription
accountIdbodystringAccountID / ExternalID / Error are server-managed publish results, set only by the publish path (never by a client update): the account a post was published…
channelbodystringChannel is the network this post targets: x, facebook, instagram, linkedin, tiktok, youtube or threads.
contentbodystringContent is the post's text, bounded at 8192 characters.
createdAtbodyintegerCreatedAt is when the post was created, as a unix timestamp in seconds.
errorbodystringError is why the last publish attempt failed, verbatim and bounded.
externalIdbodystringExternalID is the id the network returned for the published post, which is what reconciles this row against the post on the network.
idbodystringID is the post's identifier, minted on create and the id every later call addresses it by.
mediabodystring[]Media is the post's attached media as a list of URLs (images today; the composer's URL field now, an S3 picker later, populate it).
scheduleAtbodyintegerScheduleAt is when the post is due, as a unix timestamp in SECONDS. 0 means unscheduled.
statusbodystringStatus is the post's lifecycle state: draft, scheduled, published or failed.
updatedAtbodyintegerUpdatedAt is when the post row last changed, as a unix timestamp in seconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo social posts publish <id>

Social API · All Hanzo APIs · Interactive reference

How is this guide?

On this page