Publish the draft as a new version (TEST documents use it at once)
Runs the same validation and, if nothing fails, creates an immutable version with the exact images it uses (II-D187, II-D224): TEST documents print with it from now on. LIVE documents keep their version until a person approves and POST /v1/templates/{id}/promote moves them (II-D218); the answer says how. Send the revision you validated: if the draft changed since, nothing is published. If the render service is down, nothing is published and you can retry.
POST
https://api.invox.page/v1/templates/{id}/publishAuthorization
Path parameters
Header parameters
Request body JSON required
Returns
200
A retry: the version the first request published. Or the draft is exactly the latest published version (same source, manifest and images): that version, with already_published: true; nothing new is created and no event is sent.
JSON
201
The version, and what to do to take it to production.
JSON
400
organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid · malformed_request: The request body is not valid JSON · idempotency_key_required: This write needs an Idempotency-Key header
JSON
401
unauthenticated: No credential was sent · invalid_credential: The credential is not valid
JSON
403
missing_scope: The credential lacks the permission this operation requires · organization_mismatch: The X-Organization header names another organization than the key's · organization_archived: The organization is archived
JSON
404
not_found: The resource does not exist in this organization · template_not_found: The template does not exist in this organization
JSON
409
template_archived: The template is archived · template_draft_conflict: The draft changed since you read it
JSON
422
idempotency_key_reused: This Idempotency-Key was already used with a different request · template_validation_failed: The template does not pass the validation
JSON
429
rate_limited: Too many requests
JSON
500
internal_error: The service failed
JSON
503
service_unavailable: The service cannot answer right now · render_unavailable: The document could not be rendered right now
JSON