Posts

Submit for approval

Send a draft into the approval flow for a workspace admin to review — the natural end point for draft-only credentials. The post becomes reviewing and is locked; once approved it stays approved and is not sent automatically: someone with the publish tier must call the publish endpoint (or click Publish in the app). precheckOk tells you whether it could go out right now.

POST/api/v1/posts/{postId}/submit
approvals:writewrite tierIdempotency-Key optional

Authorization & guardrails

  • Send Authorization: Bearer <credential>; credentials are issued under Settings → Integrations → Long-lived credentials, see Authentication.
  • The credential needs scope approvals:write; the issuer's workspace role must also allow the action.
  • Rate limit: write tier, 10/min per credential; over the cap returns 429 with Retry-After.
  • Idempotency: honoured when Idempotency-Key is present; optional otherwise.

Path parameters

postIdstringrequired

Draft id.

Request body (application/json)

clientRequestIdstringoptional

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/submit" \
  -H "Authorization: Bearer popkit_it_••••••••" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: acme-2026-09-21-001"
Response
OK
{
  "data": {
    "postId": "pst_01J8ZK3R7QW6M2",
    "status": "reviewing",
    "approvalId": "apr_01J8ZM…",
    "deepLink": "https://popkit.loxily.com/approvals",
    "precheckOk": true
  },
  "meta": {
    "requestId": "6a1d0c9e-2b7f-4e3a-8c5d-1f0e9b8a7c68"
  }
}