v54

latestSwagger 2.0AGPL-3.0raw.githubusercontent.com2026-08-03397565628.8 KB
Templates

Create template by organization

post/api/v2/organizations/{organization}/templates

Path parameters

organizationstring required

Organization ID

Request body

activity_bump_msinteger

ActivityBumpMillis allows optionally specifying the activity bump duration for all workspaces created from this template. Defaults to 1h but can be set to 0 to disable activity bumping.

allow_user_autostartboolean

AllowUserAutostart allows users to set a schedule for autostarting their workspace. By default this is true. This can only be disabled when using an enterprise license.

allow_user_autostopboolean

AllowUserAutostop allows users to set a custom workspace TTL to use in place of the template's DefaultTTL field. By default this is true. If false, the DefaultTTL will always be used. This can only be disabled when using an enterprise license.

allow_user_cancel_workspace_jobsboolean

Allow users to cancel in-progress workspace jobs. *bool as the default value is "true".

cors_behavior'simple' | 'passthru'
default_ttl_msinteger

DefaultTTLMillis allows optionally specifying the default TTL for all workspaces created from this template.

delete_ttl_msinteger

TimeTilDormantAutoDeleteMillis allows optionally specifying the max lifetime before Coder permanently deletes dormant workspaces created from this template.

descriptionstring

Description is a description of what the template contains. It must be less than 128 bytes.

disable_everyone_group_accessboolean

DisableEveryoneGroupAccess allows optionally disabling the default behavior of granting the 'everyone' group access to use the template. If this is set to true, the template will not be available to all users, and must be explicitly granted to users or groups in the permissions settings of the template.

display_namestring

DisplayName is the displayed name of the template.

dormant_ttl_msinteger

TimeTilDormantMillis allows optionally specifying the max lifetime before Coder locks inactive workspaces created from this template.

failure_ttl_msinteger

FailureTTLMillis allows optionally specifying the max lifetime before Coder stops all resources for failed workspaces created from this template.

iconstring

Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard.

max_port_share_level'owner' | 'authenticated' | 'organization' | 'public'
namestring required

Name is the name of the template.

require_active_versionboolean

RequireActiveVersion mandates that workspaces are built with the active template version.

template_use_classic_parameter_flowboolean

UseClassicParameterFlow allows optionally specifying whether the template should use the classic parameter flow. The default if unset is true, and is why *bool is used here. When dynamic parameters becomes the default, this will default to false.

template_version_idstring uuid required

VersionID is an in-progress or completed job to use as an initial version of the template.

This is required on creation to enable a user-flow of validating a template works. There is no reason the data-model cannot support empty templates, but it doesn't make sense for users.

time_til_autostop_notify_msinteger

TimeTilAutostopNotifyMillis allows optionally specifying the duration before the autostop deadline at which a reminder notification is sent for workspaces created from this template. Defaults to 0 (disabled).

Response

OK

active_user_countinteger

ActiveUserCount is set to -1 when loading.

active_version_idstring uuid
activity_bump_msinteger
allow_user_autostartboolean

AllowUserAutostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature.

allow_user_autostopboolean
allow_user_cancel_workspace_jobsboolean
build_time_statsCodersdkTemplateBuildTimeStats
cors_behavior'simple' | 'passthru'
created_atstring date-time
created_by_idstring uuid
created_by_namestring
default_ttl_msinteger
deletedboolean
deprecatedboolean
deprecation_messagestring
descriptionstring
disable_module_cacheboolean

DisableModuleCache disables the use of cached Terraform modules during provisioning.

display_namestring
failure_ttl_msinteger

FailureTTLMillis, TimeTilDormantMillis, and TimeTilDormantAutoDeleteMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature.

iconstring
idstring uuid
max_port_share_level'owner' | 'authenticated' | 'organization' | 'public'
namestring
organization_display_namestring
organization_iconstring
organization_idstring uuid
organization_namestring url
provisioner'terraform'
require_active_versionboolean

RequireActiveVersion mandates that workspaces are built with the active template version.

time_til_autostop_notify_msinteger

TimeTilAutostopNotifyMillis is the duration before the workspace's autostop deadline at which a reminder notification is sent. 0 disables the notification.

time_til_dormant_autodelete_msinteger
time_til_dormant_msinteger
updated_atstring date-time
use_classic_parameter_flowboolean