Skip to content

Templates API

8 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes

GET/catalog/templates

List the one-click template catalog

Built-in, reviewed templates. q matches every word in the name, summary, tags, licence and database engines (best match first); category and license filter. Source-available templates carry licenseClass: source-available.

ParameterInTypeDescription
qquerystringSearch terms (name, summary, tags)
categoryqueryenum: homelab | media | storage | games | devtools | ai | data | web | analytics | automation | productivity | securityRestrict to a category
licensequerystringRestrict to a licence class: permissive, copyleft, source-available or proprietary
Response 200 · OK · application/json
TemplateCatalog
  • TemplateCategory[] | nullrequired
  • TemplateSummary[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/catalog/templates/{templateId}

Get a template

ParameterInTypeDescription
templateIdrequiredpathstring
Response 200 · OK · application/json
CatalogTemplate
  • categorystringrequired
  • descriptionstring
  • groupstring
  • heavyboolean
  • iconstring
  • idstringrequired
  • TemplateInput[] | nullrequired
  • TemplateLinksrequired
  • namestringrequired
  • notesstring[] | nullrequired
  • TemplateOrigin
  • TemplateRequiresrequired
  • requiresUnrestrictedboolean
  • revisioninteger (int64)required
  • schemainteger (int64)required
  • TemplateService[] | nullrequired
  • summarystringrequired
  • tagsstring[] | nullrequired
  • TemplateUpstreamrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/environments/{environmentId}/template-instances

List the template stacks installed in an environment

ParameterInTypeDescription
environmentIdrequiredpathstring
Response 200 · OK · application/json
TemplateInstance[] | null
  • createdAtstring (date-time)required
  • currentRevisioninteger (int64)required
  • currentVersionstringrequired
  • environmentIdstringrequired
  • groupIdstringrequired
  • idstringrequired
  • map of stringrequired
  • namestringrequired
  • TemplateInstanceService[] | nullrequired
  • templateIdstringrequired
  • templateRevisioninteger (int64)required
  • templateVersionstringrequired
  • updateAvailablebooleanrequired
  • updateBlockedstring
  • updatedAtstring (date-time)
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/environments/{environmentId}/templates/{templateId}/instances

Install a template

Creates the template's services, volumes, files, variables (secrets generated once), domain, published ports, links and a canvas group as staged changes. With deploy: true the new services are deployed in dependency order (needs deployments:write); templates that publish TCP/UDP ports also need proxy:write.

ParameterInTypeDescription
Idempotency-KeyheaderstringClient-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours.
environmentIdrequiredpathstring
templateIdrequiredpathstring
Request body · application/json · required
TemplateInstallRequest
  • deployboolean
  • map of string
  • namestring
  • serverIdstringrequired
Response 201 · Created · application/json
TemplateInstallResult
  • DeploymentView[] | nullrequired
  • TemplateInstancerequired
  • ServiceView[] | nullrequired
  • warningsstring[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/environments/{environmentId}/templates/{templateId}/plan

Preflight a template install

Returns the services that would be created, the secrets that would be generated (names only) and checks against the chosen server (architecture, memory, proxy, domain, published ports). Nothing is written.

ParameterInTypeDescription
environmentIdrequiredpathstring
templateIdrequiredpathstring
Request body · application/json · required
TemplatePlanRequest
  • map of string
  • serverIdstring
Response 200 · OK · application/json
TemplatePlan
  • TemplatePlanCheck[] | nullrequired
  • TemplatePlanInput[] | nullrequired
  • installablebooleanrequired
  • proxyRestartbooleanrequired
  • secretsstring[] | nullrequired
  • TemplatePlanService[] | nullrequired
  • TemplateSummaryrequired
  • warningsstring[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

DELETE/template-instances/{instanceId}

Delete a template stack

Removes every service of the stack. Requires confirm=<template id>. Volumes are kept unless deleteVolumes=true.

ParameterInTypeDescription
instanceIdrequiredpathstring
confirmquerystringMust equal the template id
deleteVolumesquerybooleanAlso remove the stack's Docker volumes (data is lost)
Response 204 · No Content

No body.

Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/template-instances/{instanceId}/update

Diff an installed stack against the template's current revision

Lists what changed between the template as installed and the catalog's current revision: apply changes the update would stage, kept ones that differ because you changed the service, manual ones (new or removed services, database upgrades, published ports) that an update never does. Nothing is written. blocked is set for stacks installed before updates existed.

ParameterInTypeDescription
instanceIdrequiredpathstring
Response 200 · OK · application/json
TemplateUpdate
  • appliedinteger (int64)required
  • applyinteger (int64)required
  • availablebooleanrequired
  • blockedstring
  • TemplateUpdateChange[] | nullrequired
  • currentRevisioninteger (int64)required
  • currentVersionstringrequired
  • TemplatePlanInput[] | nullrequired
  • installedRevisioninteger (int64)required
  • installedVersionstringrequired
  • instanceIdstringrequired
  • keptinteger (int64)required
  • manualinteger (int64)required
  • namestringrequired
  • notesstring[] | nullrequired
  • templateIdstringrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/template-instances/{instanceId}/update

Stage a template update

Stages the apply changes of the diff as ordinary edits of the stack's services (image, configuration, variables, files, volumes); nothing is deployed, the staged bar and Deploy do that. Fields you changed are kept, secrets are never overwritten, and databases, routes and services are never touched. revision must be the revision you reviewed (409 template_changed otherwise). A retry after a failure is safe.

ParameterInTypeDescription
Idempotency-KeyheaderstringClient-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours.
instanceIdrequiredpathstring
Request body · application/json · required
TemplateUpdateRequest
  • map of string
  • revisioninteger (int64)required
Response 200 · OK · application/json
TemplateUpdateResult
  • TemplateUpdateChange[] | nullrequired
  • TemplateInstancerequired
  • servicesstring[] | nullrequired
  • stagedinteger (int64)required
  • warningsstring[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflicttemplate_changed
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.