Publishing

Publish / retry

Publish an existing post: send an approved post, or retry a failed one (optionally a single account via accountId). Passing scheduledAt for an approved post turns it into a scheduled publish (schedule tier). Any other status is refused.

POST/api/v1/posts/{postId}/publish
publish:executeschedule:writepublish tierIdempotency-Key required

Authorization & guardrails

  • Send Authorization: Bearer <credential>; credentials are issued under Settings → Integrations → Long-lived credentials, see Authentication.
  • The credential needs scope publish:execute / schedule:write (any one lets you call it; which tier you may use is decided by the credential's publish allow-list); the issuer's workspace role must also allow the action.
  • Rate limit: publish tier, 5/min per credential; over the cap returns 429 with Retry-After.
  • Idempotency: Idempotency-Key is required (400 without it); a retry with the same key returns the first result with meta.replayed: true.

Path parameters

postIdstringrequired

Post id.

Request body (application/json)

accountIdstringoptional

Retry only this account (for failed posts).

scheduledAtdatetime (ISO 8601, with timezone)optional

For approved posts: publish at this time instead of now.

clientRequestIdstringrequired

Idempotency key (8–128 chars of [A-Za-z0-9_.:-]); prefer the Idempotency-Key header, which wins over the body.

Responses

Success is HTTP 200 with a { data, meta } envelope; examples per status are on the right (at the end of the page on narrow screens). Every error is { error: { code, message, params }, meta } — branch on the code, not the message; see Errors.

StatusPossible codes
400invalid_input
401unauthenticated
402plan_limit
403forbidden / workspace_not_found
404not_found
409no_account / needs_reauth / replay
429rate_limited
500internal
502platform_error
503external_writes_off

Examples

Request
curl -X POST "https://popkit.loxily.com/api/v1/posts/pst_01J8ZK3R7QW6M2/publish" \
  -H "Authorization: Bearer popkit_it_••••••••" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: acme-2026-09-21-001" \
  -d '{
  "accountId": "acc_01J8Y…"
}'
Response
Publishing
{
  "data": {
    "postId": "pst_01J8ZK3R7QW6M2",
    "status": "publishing",
    "scheduledAt": null,
    "deepLink": "https://popkit.loxily.com/history?post=pst_01J8ZK3R7QW6M2"
  },
  "meta": {
    "requestId": "6a1d0c9e-2b7f-4e3a-8c5d-1f0e9b8a7c71"
  }
}