Kalpana Docs
Resources

Set a template's collections

Replace the full list of collections a template belongs to.

PUT /api/templates/{templateId}/template-collections

Requires templates:update.

FieldRequiredDescription
workspaceYesWorkspace slug or id.
collectionIdsYesEvery collection the template should be in. An empty array removes it from all of them. Repeated ids count once.
curl --request PUT "https://app.kalpana.one/api/templates/tpl_123/template-collections" \
  --header "x-api-key: $KALPANA_API_KEY" \
  --header "content-type: application/json" \
  --data '{"workspace":"acme","collectionIds":["COLLECTION_ID"]}'

Response

{ "collectionIds": ["0192f8a4-6c1e-7c3a-9b0e-4d2f1a7e5c11"] }

The list replaces the old one: collections left out lose the template. To add to one collection and keep the rest, use Add a template to a collection.

Errors

StatusCause
400A collection id does not exist in the workspace. The message is One or more template collections do not exist.
403Your role or key lacks templates:update.
404The template is not in this workspace or has been deleted.
Was this page helpful?

Updated 4 Nov 2026

On this page