Palbase Flags · API
/flags/templates/publishPublish the draft
Publishes the draft named in If-Match: its definitions become the live ones and the next version in one transaction, and every reader is told. The same Idempotency-Key answers the first publication again; an unchanged draft publishes nothing. A draft with issues is refused (409 template_validation_failed) with the issues.
Called by your server, with the project's secret key.
Headers
If-Matchstring · requiredThe draft's ETag ("flags-draft-<id>-<revision>").Idempotency-Keystring · requiredOne publication's key: the same key answers its first publication again (1 to 128 printable ASCII).Request body
notestring · optionalWhy (2048 characters at most).curl -X POST "https://<your-ref>.palbase.studio/flags/templates/publish" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"note":"string"}'Responses
200The publication
400The request is malformed, or a definition or a value breaks a flag's rules (the error names which)
401No key, or not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key
409The project's state refuses it, or the draft has issues (listed)
412The template or draft changed since it was read (If-Match)
413A template request is at most 256 KiB
415A template request is application/json
428If-Match is required: read the template or draft and send its ETag
429The project's request rate, or its flag reads for the period under its quota, are used up; Retry-After says when to try again
503The platform could not answer now; retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation PublishTemplate of flags's contract.