Browse documentation
Validate a destination, publish with confirmation, and verify results.
The flow is preview → publish → poll.
POST /v1/brands/{brand_id}/publishing/previews (publishing:preview)
Headers: Idempotency-Key (required). Costs 1 credit. Never publishes.
options.destination_status defaults to publish. options.include_tracking may only be true or omitted (tracking is always applied).
Checks: write capability (api.publishing.enabled) → brand → content in brand → destination in brand, channel not frozen (403), healthy (409 integration_not_ready).
Produces warnings, which make status: "invalid":
Warning code | When |
|---|---|
| Channel cannot take this content type |
| Status not |
|
|
Response: publishing_preview with changed_fields (title, body, excerpt, slug, tags, plus featured_media if a cover exists), preserved_fields (product_references for self-hosted WordPress with a content profile), warnings, would_publish, a content_fingerprint (SHA-256 of title, slug, excerpt, body and tags) and expires_at (1 hour). Invalid previews are stored and charged too.
POST /v1/brands/{brand_id}/publishing/operations (publishing:write)
Headers: Idempotency-Key (required). Costs 3 credits. External side effect.
Body | Rules |
|---|---|
| UUID in the brand |
|
|
| UUID; required when the flag |
|
|
| must be |
|
|
The server re-validates everything: scope, brand, destination health and freeze, content-type compatibility (422), draft support (422), content readiness (409 invalid_state). If a preview is used, it must belong to this owner and brand, match the content and integration, be valid, be unexpired, and its fingerprint must equal the current content (409 invalid_state, so create a new preview). Then: atomic admission including the per-channel in-flight cap → content_publications row (pending) → api_publishing_operations row → enqueue with attempts: 1.
Response 202: publishing_operation (accepted) with operation_id and job_id.
Duplicate protection: the same idempotency key never creates a second operation. API publish jobs never auto-retry. WordPress adapters do a slug read-before-write for API jobs.
GET /v1/brands/{brand_id}/publishing/operations/{operation_id}
Scopes (any): jobs:read, publishing:write. Derives and persists the current state from the publication row and the queue:
|
| Meaning |
|---|---|---|
| null | Waiting |
| null | Worker is publishing |
|
| Provider accepted but no URL to verify yet |
|
| Published; |
|
| See |
| null | Queue job failed or is missing without a publication outcome — needs operator triage |
| null | Cancelled before publishing |
awaiting_verification is true until verified, failed or cancelled.
Request examples
Choose a language for each endpoint. Set your assigned HTTPS API origin and environment variables, then replace the <placeholders>. These examples do not run requests in your browser.
POST/v1/brands/{brand_id}/publishing/previews
This is a write operation. Review the body and confirmation requirements before running it.
: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
: "${CITERA_IDEMPOTENCY_KEY:?Set CITERA_IDEMPOTENCY_KEY}"
# Review this write and replace every <placeholder> before running.
curl --fail-with-body --connect-timeout 10 --max-time 30 -X POST "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/publishing/previews" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${CITERA_API_KEY}" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ${CITERA_IDEMPOTENCY_KEY}" \
--data-raw '{"content_id":"<content_id>","integration_id":"<integration_id>","options":{"destination_status":"draft"}}'POST/v1/brands/{brand_id}/publishing/operations
This is a write operation. Review the body and confirmation requirements before running it.
: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
: "${CITERA_IDEMPOTENCY_KEY:?Set CITERA_IDEMPOTENCY_KEY}"
# Review this write and replace every <placeholder> before running.
curl --fail-with-body --connect-timeout 10 --max-time 30 -X POST "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/publishing/operations" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${CITERA_API_KEY}" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ${CITERA_IDEMPOTENCY_KEY}" \
--data-raw '{"preview_id":"<preview_id>","content_id":"<content_id>","integration_id":"<integration_id>","destination_status":"draft","confirm":true}'GET/v1/brands/{brand_id}/publishing/operations/{operation_id}
: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
: "${OPERATION_ID:?Set OPERATION_ID}"
curl --fail-with-body --connect-timeout 10 --max-time 30 -X GET "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/publishing/operations/${OPERATION_ID}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${CITERA_API_KEY}"