Galon Cloud
Galon API v1

/templates/{template}/publish

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

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

NameInTypeDescription
templatepathstring · required

Responses

StatusDescriptionBody
200Identical version already publishedTemplatePublishResponse
201New version publishedTemplatePublishResponse
403scope_missing (template:write)
404template_not_found
422template_not_publishable or template_variable_undeclared
503mail_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>")