POST /templates/{template}/publish
Publish an immutable version of the draft
A publication identical to the latest version is idempotent and returns created=false.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
template | path | string · required |
Responses
| Status | Description | Body |
|---|---|---|
200 | Identical version already published | TemplatePublishResponse |
201 | New version published | TemplatePublishResponse |
403 | scope_missing (template:write) | |
404 | template_not_found | |
422 | template_not_publishable or template_variable_undeclared | |
503 | mail_contacts_unavailable |
Examples
curl
curl -X POST "$GALON_API_BASE/templates/<template>/publish" \
-H "Authorization: Bearer $GALON_API_KEY"Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.templates.publish("<id>");Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.templates.publish("<id>")