v54

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

Update template settings by ID

patch/api/v2/templates/{template}

Path parameters

templatestring uuid required

Template 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
allow_user_autostopboolean
allow_user_cancel_workspace_jobsboolean
cors_behavior'simple' | 'passthru'
default_ttl_msinteger
deprecation_messagestring

DeprecationMessage if set, will mark the template as deprecated and block any new workspaces from using this template. If passed an empty string, will remove the deprecated message, making the template usable for new workspaces again.

descriptionstring
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.

disable_module_cacheboolean

DisableModuleCache disables the using of cached Terraform modules during provisioning. It is recommended not to disable this.

display_namestring
failure_ttl_msinteger
iconstring
max_port_share_level'owner' | 'authenticated' | 'organization' | 'public'
namestring
require_active_versionboolean

RequireActiveVersion mandates workspaces built using this template use the active version of the template. This option has no effect on template admins.

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). Omitting the field keeps the existing value.

time_til_dormant_autodelete_msinteger
time_til_dormant_msinteger
update_workspace_dormant_atboolean

UpdateWorkspaceDormantAt updates the dormant_at field of workspaces spawned from the template. This is useful for preventing dormant workspaces being immediately deleted when updating the dormant_ttl field to a new, shorter value.

update_workspace_last_used_atboolean

UpdateWorkspaceLastUsedAt updates the last_used_at field of workspaces spawned from the template. This is useful for preventing workspaces being immediately locked when updating the inactivity_ttl field to a new, shorter value.

use_classic_parameter_flowboolean

UseClassicParameterFlow is a flag that switches the default behavior to use the classic parameter flow when creating a workspace. This only affects deployments with the experiment "dynamic-parameters" enabled. This setting will live for a period after the experiment is made the default. An "opt-out" is present in case the new feature breaks some existing templates.

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