REST API
Reference for the Coder REST API, including endpoints, authentication, and schemas.
On this page
Get started with the Coder API:
Set up your environment
Set up your environmentThe code samples on each endpoint's page read your deployment URL and a session token from two environment variables, CODER_URL and CODER_SESSION_TOKEN, the same ones the Coder CLI reads.
If you are logged in with the Coder CLI v2.31.1 or later and have jq installed, set both from your login:
export CODER_URL="$(coder whoami -o json | jq -r '.[0].url')"
export CODER_SESSION_TOKEN="$(coder login token)"For scripts and CI, create a long-lived token instead, with coder tokens create or under Settings > Tokens in the dashboard:
coder tokens create --name ci --lifetime 30dStore the token in your secret store, and set the variables from it where the script runs:
export CODER_URL="https://coder.example.com"
export CODER_SESSION_TOKEN="$(cat /run/secrets/coder-token)"Keep the token out of your shell history and out of committed files.
Quickstart
QuickstartGenerate a token on your Coder deployment by visiting:
https://coder.example.com/settings/tokensList your workspaces
# CLI
curl https://coder.example.com/api/v2/workspaces?q=owner:me \
-H "Coder-Session-Token: <your-token>"Use cases
Use casesSee some common use cases for the REST API.
Request size limits
Request size limitsAn endpoint that accepts a request body reads at most 4 MiB of it, unless it
sets a limit of its own.
An endpoint that sets its own limit declares 413 in this reference and
names the limit in the description, so the per-endpoint page is where to look
one up. A few endpoints answer 413 for a reason other than the size of
the request body, and their descriptions say so.
A body that exceeds the limit that applies to it is answered with
413 Payload Too Large, and the response names the limit it exceeded:
{
"message": "Request body too large.",
"detail": "Maximum request body size is 4194304 bytes."
}The limits are fixed. There is no deployment option that raises them.
Sections
SectionsGeneral
API root handler GET
/api/v2/
Build info GET
/api/v2/buildinfo
Report CSP violations POST
/api/v2/csp/reports
Get deployment config GET
/api/v2/deployment/config
SSH Config GET
/api/v2/deployment/ssh
Get deployment stats GET
/api/v2/deployment/stats
Get user secrets capabilities GET
/api/v2/deployment/user-secrets/capabilities
Get enabled experiments GET
/api/v2/experiments
Get safe experiments GET
/api/v2/experiments/available
Update check GET
/api/v2/updatecheck
Get token config GET
/api/v2/users/{user}/keys/tokens/tokenconfig
AI Gateway
List AI Gateway clients GET
/api/v2/ai-gateway/clients Alias: also available at /api/v2/aibridge/clients for backward compatibility.
List AI Gateway models GET
/api/v2/ai-gateway/models Alias: also available at /api/v2/aibridge/models for backward compatibility.
List AI Gateway providers GET
/api/v2/ai-gateway/providers
List AI Gateway sessions GET
/api/v2/ai-gateway/sessions Alias: also available at /api/v2/aibridge/sessions for backward compatibility.
Get AI Gateway session threads GET
/api/v2/ai-gateway/sessions/{session_id} Alias: also available at /api/v2/aibridge/sessions/{session_id} for backward compatibility.
AI Providers
List AI providers GET
/api/v2/ai/providers
Create an AI provider POST
/api/v2/ai/providers
Get an AI provider GET
/api/v2/ai/providers/{idOrName}
Delete an AI provider DELETE
/api/v2/ai/providers/{idOrName}
Update an AI provider PATCH
/api/v2/ai/providers/{idOrName}
Agents
Get DERP map updates GET
/api/v2/derp-map
User-scoped tailnet RPC connection GET
/api/v2/tailnet
Authenticate agent on AWS instance POST
/api/v2/workspaceagents/aws-instance-identity
Authenticate agent on Azure instance POST
/api/v2/workspaceagents/azure-instance-identity
Authenticate agent on Google Cloud instance POST
/api/v2/workspaceagents/google-instance-identity
Get workspace agent external auth GET
/api/v2/workspaceagents/me/external-auth
Removed: Get workspace agent git auth GET
/api/v2/workspaceagents/me/gitauth
Get workspace agent Git SSH key GET
/api/v2/workspaceagents/me/gitsshkey
Post workspace agent log source POST
/api/v2/workspaceagents/me/log-source
Patch workspace agent logs PATCH
/api/v2/workspaceagents/me/logs
Get workspace agent reinitialization GET
/api/v2/workspaceagents/me/reinit
Get workspace agent by ID GET
/api/v2/workspaceagents/{workspaceagent}
Get connection info for workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/connection
Get running containers for workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/containers
Delete devcontainer for workspace agent DELETE
/api/v2/workspaceagents/{workspaceagent}/containers/devcontainers/{devcontainer}
Recreate devcontainer for workspace agent POST
/api/v2/workspaceagents/{workspaceagent}/containers/devcontainers/{devcontainer}/recreate
Watch workspace agent for container updates. GET
/api/v2/workspaceagents/{workspaceagent}/containers/watch
Coordinate workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/coordinate
Get listening ports for workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/listening-ports
Get logs by workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/logs
Open PTY to workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/pty
Removed: Get logs by workspace agent GET
/api/v2/workspaceagents/{workspaceagent}/startup-logs
Patch workspace agent app status PATCH Deprecated endpoint
/api/v2/workspaceagents/me/app-status
Applications
Redirect to URI with encrypted API key GET
/api/v2/applications/auth-redirect
Get applications host GET Deprecated endpoint
/api/v2/applications/host
Audit
Get audit logs GET
/api/v2/audit
Authorization
List API key scopes GET
/api/v2/auth/scopes
Check authorization POST
/api/v2/authcheck
Log in user POST
/api/v2/users/login
Change password with a one-time passcode POST
/api/v2/users/otp/change-password
Request one-time passcode POST
/api/v2/users/otp/request
Validate user password POST
/api/v2/users/validate-password
Convert user from password to oauth authentication POST
/api/v2/users/{user}/convert-login
Builds
Get workspace build by user, workspace name, and build number GET
/api/v2/users/{user}/workspace/{workspacename}/builds/{buildnumber}
Get workspace build GET
/api/v2/workspacebuilds/{workspacebuild}
Cancel workspace build PATCH
/api/v2/workspacebuilds/{workspacebuild}/cancel
Get workspace build logs GET
/api/v2/workspacebuilds/{workspacebuild}/logs
Get build parameters for workspace build GET
/api/v2/workspacebuilds/{workspacebuild}/parameters
Get workspace build secrets GET
/api/v2/workspacebuilds/{workspacebuild}/secrets Lists the metadata of the secrets linked to a workspace build, including secrets whose values a later build cleared.
Get provisioner state for workspace build GET
/api/v2/workspacebuilds/{workspacebuild}/state
Update workspace build state PUT
/api/v2/workspacebuilds/{workspacebuild}/state
Get workspace build timings by ID GET
/api/v2/workspacebuilds/{workspacebuild}/timings
Get workspace builds by workspace ID GET
/api/v2/workspaces/{workspace}/builds
Create workspace build POST
/api/v2/workspaces/{workspace}/builds
Removed: Get workspace resources for workspace build GET Deprecated endpoint
/api/v2/workspacebuilds/{workspacebuild}/resources
Chats
Connect to chat workspace desktop via WebSockets GET
/api/experimental/chats/{chat}/stream/desktop Raw binary WebSocket stream of the chat workspace desktop.
List chats GET
/api/v2/chats
Create chat POST
/api/v2/chats
List chats by workspace GET
/api/v2/chats/by-workspace
Get chat auto archive days GET
/api/v2/chats/config/auto-archive-days
Update chat auto archive days PUT
/api/v2/chats/config/auto-archive-days
Get chat debug logging setting GET
/api/v2/chats/config/debug-logging
Update chat debug logging setting PUT
/api/v2/chats/config/debug-logging
Get chat debug retention days GET
/api/v2/chats/config/debug-retention-days
Update chat debug retention days PUT
/api/v2/chats/config/debug-retention-days
Get chat personal model override settings GET
/api/v2/chats/config/personal-model-overrides
Update chat personal model override settings PUT
/api/v2/chats/config/personal-model-overrides
Get chat plan mode instructions GET
/api/v2/chats/config/plan-mode-instructions
Update chat plan mode instructions PUT
/api/v2/chats/config/plan-mode-instructions
Get chat system prompt GET
/api/v2/chats/config/system-prompt
Update chat system prompt PUT
/api/v2/chats/config/system-prompt
Get user chat debug logging setting GET
/api/v2/chats/config/user-debug-logging
Update user chat debug logging setting PUT
/api/v2/chats/config/user-debug-logging
Get user chat custom prompt GET
/api/v2/chats/config/user-prompt
Update user chat custom prompt PUT
/api/v2/chats/config/user-prompt
Get chat workspace time to live GET
/api/v2/chats/config/workspace-ttl
Update chat workspace time to live PUT
/api/v2/chats/config/workspace-ttl
Upload chat file POST
/api/v2/chats/files
Get chat file GET
/api/v2/chats/files/{file}
Watch chat events for a user via WebSockets GET
/api/v2/chats/watch
Get chat by ID GET
/api/v2/chats/{chat}
Update chat PATCH
/api/v2/chats/{chat}
List chat attachments GET
/api/v2/chats/{chat}/attachments Returns every file part in the user-visible user and assistant messages of a chat, newest first, so a client can list a chat's attachments without paging through every message in the chat.
Refresh chat context PUT
/api/v2/chats/{chat}/context
Get chat cost GET
/api/v2/chats/{chat}/cost Cost covers the whole chat tree: the root chat plus every subagent chat beneath it.
Get chat diff contents GET
/api/v2/chats/{chat}/diff
Interrupt chat POST
/api/v2/chats/{chat}/interrupt
List chat messages GET
/api/v2/chats/{chat}/messages
Send chat message POST
/api/v2/chats/{chat}/messages
Edit chat message PATCH
/api/v2/chats/{chat}/messages/{message}
List chat user prompts GET
/api/v2/chats/{chat}/prompts Returns the user-authored prompts in a chat, newest first, with each prompt's text parts concatenated in the order they were authored.
Delete chat queued message DELETE
/api/v2/chats/{chat}/queue/{queuedMessage}
Promote chat queued message POST
/api/v2/chats/{chat}/queue/{queuedMessage}/promote
Reconcile invalid chat state POST
/api/v2/chats/{chat}/reconcile-invalid
Stream chat events via WebSockets GET
/api/v2/chats/{chat}/stream
Watch chat workspace git state via WebSockets GET
/api/v2/chats/{chat}/stream/git
Propose chat title POST
/api/v2/chats/{chat}/title/propose
Submit chat tool results POST
/api/v2/chats/{chat}/tool-results
Upload a file to a chat's workspace POST
/api/v2/chats/{chat}/workspace-files Streams the request body into the chat workspace's upload directory.
Get organization chat system prompt GET
/api/v2/organizations/{organization}/chats/config/system-prompt
Update organization chat system prompt PUT
/api/v2/organizations/{organization}/chats/config/system-prompt
List AI models and provider descriptors in an organization GET
/api/v2/organizations/{organization}/chats/models
Create an AI model in an organization POST
/api/v2/organizations/{organization}/chats/models
List user AI provider key configurations GET
/api/v2/users/{user}/ai-provider-keys
Update user AI provider key PUT
/api/v2/users/{user}/ai-provider-keys/{aiProvider}
Delete user AI provider key DELETE
/api/v2/users/{user}/ai-provider-keys/{aiProvider}
Debug
Debug Info Wireguard Coordinator GET
/api/v2/debug/coordinator
Debug Info Deployment Health GET
/api/v2/debug/health
Get health settings GET
/api/v2/debug/health/settings
Update health settings PUT
/api/v2/debug/health/settings
Debug Info Tailnet GET
/api/v2/debug/tailnet
Enterprise
OAuth2 authorization server metadata. GET
/.well-known/oauth-authorization-server
OAuth2 protected resource metadata. GET
/.well-known/oauth-protected-resource
Get agent firewall session by ID GET
/api/v2/agent-firewall/sessions/{id}
Get agent firewall session logs GET
/api/v2/agent-firewall/sessions/{id}/logs
List AI Gateway keys GET
/api/v2/ai-gateway/keys
Create AI Gateway key POST
/api/v2/ai-gateway/keys
Delete AI Gateway key DELETE
/api/v2/ai-gateway/keys/{key}
AI Gateway serve GET
/api/v2/ai-gateway/serve
Get appearance GET
/api/v2/appearance
Update appearance PUT
/api/v2/appearance
Get connection logs GET
/api/v2/connectionlog
Report a premium paywall click POST
/api/v2/deployment/premium-funnel-events
Get entitlements GET
/api/v2/entitlements
Get groups GET
/api/v2/groups
Get group by ID GET
/api/v2/groups/{group}
Delete group by name DELETE
/api/v2/groups/{group}
Update group by name PATCH
/api/v2/groups/{group}
Get group AI budget GET
/api/v2/groups/{group}/ai/budget
Upsert group AI budget PUT
/api/v2/groups/{group}/ai/budget
Delete group AI budget DELETE
/api/v2/groups/{group}/ai/budget
Get group AI spend GET
/api/v2/groups/{group}/ai/spend Returns the AI spend limit and aggregate spend for the group.
Get group members by group ID GET
/api/v2/groups/{group}/members
Get group members AI spend GET
/api/v2/groups/{group}/members/ai/spend Returns aggregate AI spend attributed to the group per requested user.
Get licenses GET
/api/v2/licenses
Add new license POST
/api/v2/licenses
Update license entitlements POST
/api/v2/licenses/refresh-entitlements
Request a trial license POST
/api/v2/licenses/trial
Delete license DELETE
/api/v2/licenses/{id}
Update notification template dispatch method PUT
/api/v2/notifications/templates/{notification_template}/method
Get OAuth2 applications. GET
/api/v2/oauth2-provider/apps
Create OAuth2 application. POST
/api/v2/oauth2-provider/apps
Get OAuth2 application. GET
/api/v2/oauth2-provider/apps/{app}
Update OAuth2 application. PUT
/api/v2/oauth2-provider/apps/{app}
Delete OAuth2 application. DELETE
/api/v2/oauth2-provider/apps/{app}
Get OAuth2 application secrets. GET
/api/v2/oauth2-provider/apps/{app}/secrets
Create OAuth2 application secret. POST
/api/v2/oauth2-provider/apps/{app}/secrets
Delete OAuth2 application secret. DELETE
/api/v2/oauth2-provider/apps/{app}/secrets/{secretID}
Get OAuth2 provider settings. GET
/api/v2/oauth2-provider/settings
Update OAuth2 provider settings. PUT
/api/v2/oauth2-provider/settings
Export organization AI spend as CSV GET
/api/v2/organizations/{organization}/ai/spend/export Returns per-user, per-group, per-model, per-provider aggregated AI spend for the organization as CSV, built from raw AI Gateway token usage.
Get groups by organization GET
/api/v2/organizations/{organization}/groups
Create group for organization POST
/api/v2/organizations/{organization}/groups
Get organization groups AI spend GET
/api/v2/organizations/{organization}/groups/ai/spend Returns AI spend limits and aggregate spend for the requested groups.
Get group by organization and group name GET
/api/v2/organizations/{organization}/groups/{groupName}
Get group members by organization and group name GET
/api/v2/organizations/{organization}/groups/{groupName}/members
Get group members AI spend by organization GET
/api/v2/organizations/{organization}/groups/{groupName}/members/ai/spend Returns aggregate AI spend attributed to the group per requested user.
Get workspace quota by user GET
/api/v2/organizations/{organization}/members/{user}/workspace-quota
Get groups by organization (paginated) GET
/api/v2/organizations/{organization}/paginated-groups Unlike "Get groups by organization" (GET /organizations/{organization}/groups), which authorizes each group individually via its ACL, this endpoint requires organization-wide group read permission…
Serve provisioner daemon GET
/api/v2/organizations/{organization}/provisionerdaemons/serve
List provisioner key GET
/api/v2/organizations/{organization}/provisionerkeys
Create provisioner key POST
/api/v2/organizations/{organization}/provisionerkeys
List provisioner key daemons GET
/api/v2/organizations/{organization}/provisionerkeys/daemons
Delete provisioner key DELETE
/api/v2/organizations/{organization}/provisionerkeys/{provisionerkey}
Get the available organization idp sync claim fields GET
/api/v2/organizations/{organization}/settings/idpsync/available-fields
Get the organization idp sync claim field values GET
/api/v2/organizations/{organization}/settings/idpsync/field-values
Get group IdP Sync settings by organization GET
/api/v2/organizations/{organization}/settings/idpsync/groups
Update group IdP Sync settings by organization PATCH
/api/v2/organizations/{organization}/settings/idpsync/groups
Update group IdP Sync config PATCH
/api/v2/organizations/{organization}/settings/idpsync/groups/config
Update group IdP Sync mapping PATCH
/api/v2/organizations/{organization}/settings/idpsync/groups/mapping
Get role IdP Sync settings by organization GET
/api/v2/organizations/{organization}/settings/idpsync/roles
Update role IdP Sync settings by organization PATCH
/api/v2/organizations/{organization}/settings/idpsync/roles
Update role IdP Sync config PATCH
/api/v2/organizations/{organization}/settings/idpsync/roles/config
Update role IdP Sync mapping PATCH
/api/v2/organizations/{organization}/settings/idpsync/roles/mapping
Get workspace sharing settings for organization GET
/api/v2/organizations/{organization}/settings/workspace-sharing
Update workspace sharing settings for organization PATCH
/api/v2/organizations/{organization}/settings/workspace-sharing
Fetch provisioner key details GET
/api/v2/provisionerkeys/{provisionerkey}
Get active replicas GET
/api/v2/replicas
Get the available idp sync claim fields GET
/api/v2/settings/idpsync/available-fields
Get the idp sync claim field values GET
/api/v2/settings/idpsync/field-values
Get organization IdP Sync settings GET
/api/v2/settings/idpsync/organization
Update organization IdP Sync settings PATCH
/api/v2/settings/idpsync/organization
Update organization IdP Sync config PATCH
/api/v2/settings/idpsync/organization/config
Update organization IdP Sync mapping PATCH
/api/v2/settings/idpsync/organization/mapping
Get template ACLs GET
/api/v2/templates/{template}/acl
Update template ACL PATCH
/api/v2/templates/{template}/acl
Get template available acl users/groups GET
/api/v2/templates/{template}/acl/available
Invalidate presets for template POST
/api/v2/templates/{template}/prebuilds/invalidate
Get user AI budget override GET
/api/v2/users/{user}/ai/budget/override
Upsert user AI budget override PUT
/api/v2/users/{user}/ai/budget/override
Delete user AI budget override DELETE
/api/v2/users/{user}/ai/budget/override
Get user AI spend GET
/api/v2/users/{user}/ai/spend
Get user quiet hours schedule GET
/api/v2/users/{user}/quiet-hours
Update user quiet hours schedule PUT
/api/v2/users/{user}/quiet-hours
Get workspace proxies GET
/api/v2/workspaceproxies
Create workspace proxy POST
/api/v2/workspaceproxies
Get workspace proxy GET
/api/v2/workspaceproxies/{workspaceproxy}
Delete workspace proxy DELETE
/api/v2/workspaceproxies/{workspaceproxy}
Update workspace proxy PATCH
/api/v2/workspaceproxies/{workspaceproxy}
Get workspace external agent credentials GET
/api/v2/workspaces/{workspace}/external-agent/{agent}/credentials
OAuth2 authorization request (GET - show authorization page). GET
/oauth2/authorize
OAuth2 authorization request (POST - process authorization). POST
/oauth2/authorize
Get OAuth2 client configuration (RFC 7592) GET
/oauth2/clients/{client_id}
Update OAuth2 client configuration (RFC 7592) PUT
/oauth2/clients/{client_id}
Delete OAuth2 client registration (RFC 7592) DELETE
/oauth2/clients/{client_id}
OAuth2 dynamic client registration (RFC 7591) POST
/oauth2/register
Revoke OAuth2 tokens (RFC 7009). POST
/oauth2/revoke
OAuth2 token exchange. POST
/oauth2/tokens
Delete OAuth2 application tokens. DELETE
/oauth2/tokens
SCIM 2.0: Service Provider Config GET
/scim/v2/ServiceProviderConfig
SCIM 2.0: Get users GET
/scim/v2/Users
SCIM 2.0: Create new user POST
/scim/v2/Users
SCIM 2.0: Get user by ID GET
/scim/v2/Users/{id}
SCIM 2.0: Replace user account PUT
/scim/v2/Users/{id}
SCIM 2.0: Update user account PATCH
/scim/v2/Users/{id}
Get workspace quota by user deprecated GET Deprecated endpoint
/api/v2/workspace-quota/{user}
Files
Upload file POST
/api/v2/files Swagger notice: Swagger 2.0 doesn't support file upload with a content-type different than application/x-www-form-urlencoded.
Get file by ID GET
/api/v2/files/{fileID}
Git
Get user external auths GET
/api/v2/external-auth
Get external auth by ID GET
/api/v2/external-auth/{externalauth}
Delete external auth user link by ID DELETE
/api/v2/external-auth/{externalauth}
Get external auth device by ID. GET
/api/v2/external-auth/{externalauth}/device
Post external auth device by ID POST
/api/v2/external-auth/{externalauth}/device
InitScript
Get agent init script GET
/api/v2/init-script/{os}/{arch}
Insights
Get deployment DAUs GET
/api/v2/insights/daus
Get insights about templates GET
/api/v2/insights/templates
Get insights about user activity GET
/api/v2/insights/user-activity
Get insights about user latency GET
/api/v2/insights/user-latency
Get insights about user status counts GET
/api/v2/insights/user-status-counts
Members
Get member roles by organization GET
/api/v2/organizations/{organization}/members/roles
Update a custom organization role PUT
/api/v2/organizations/{organization}/members/roles
Insert a custom organization role POST
/api/v2/organizations/{organization}/members/roles
Delete a custom organization role DELETE
/api/v2/organizations/{organization}/members/roles/{roleName}
Get organization member GET
/api/v2/organizations/{organization}/members/{user}
Add organization member POST
/api/v2/organizations/{organization}/members/{user}
Remove organization member DELETE
/api/v2/organizations/{organization}/members/{user}
Assign role to organization member PUT
/api/v2/organizations/{organization}/members/{user}/roles
Paginated organization members GET
/api/v2/organizations/{organization}/paginated-members
Get site member roles GET
/api/v2/users/roles
List organization members GET Deprecated endpoint
/api/v2/organizations/{organization}/members
Notifications
Send a custom notification POST
/api/v2/notifications/custom
Get notification dispatch methods GET
/api/v2/notifications/dispatch-methods
List inbox notifications GET
/api/v2/notifications/inbox
Mark all unread notifications as read PUT
/api/v2/notifications/inbox/mark-all-as-read
Watch for new inbox notifications GET
/api/v2/notifications/inbox/watch
Update read status of a notification PUT
/api/v2/notifications/inbox/{id}/read-status
Get notifications settings GET
/api/v2/notifications/settings
Update notifications settings PUT
/api/v2/notifications/settings
Get custom notification templates GET
/api/v2/notifications/templates/custom
Get system notification templates GET
/api/v2/notifications/templates/system
Send a test notification POST
/api/v2/notifications/test
Get user notification preferences GET
/api/v2/users/{user}/notifications/preferences
Update user notification preferences PUT
/api/v2/users/{user}/notifications/preferences
Organizations
Get organizations GET
/api/v2/organizations
Create organization POST
/api/v2/organizations
Get organization by ID GET
/api/v2/organizations/{organization}
Delete organization DELETE
/api/v2/organizations/{organization}
Update organization PATCH
/api/v2/organizations/{organization}
Get provisioner jobs GET
/api/v2/organizations/{organization}/provisionerjobs
Get provisioner job GET
/api/v2/organizations/{organization}/provisionerjobs/{job}
PortSharing
Get workspace agent port shares GET
/api/v2/workspaces/{workspace}/port-share
Upsert workspace agent port share POST
/api/v2/workspaces/{workspace}/port-share
Delete workspace agent port share DELETE
/api/v2/workspaces/{workspace}/port-share
Prebuilds
Get prebuilds settings GET
/api/v2/prebuilds/settings
Update prebuilds settings PUT
/api/v2/prebuilds/settings
Provisioning
Get provisioner daemons GET
/api/v2/organizations/{organization}/provisionerdaemons
Secrets
List user secrets GET
/api/v2/users/{user}/secrets
Create a new user secret POST
/api/v2/users/{user}/secrets
Import user secrets from a file POST
/api/v2/users/{user}/secrets/batch
Get a user secret by name GET
/api/v2/users/{user}/secrets/{name}
Delete a user secret DELETE
/api/v2/users/{user}/secrets/{name}
Update a user secret PATCH
/api/v2/users/{user}/secrets/{name}
TemplateBuilder
List template builder base templates GET
/api/v2/templatebuilder/bases
Compose template from base and modules POST
/api/v2/templatebuilder/compose
Compose and create a template POST
/api/v2/templatebuilder/compose/template
List template builder modules GET
/api/v2/templatebuilder/modules
Report a template builder session event POST
/api/v2/templatebuilder/sessions
Templates
Get templates by organization GET
/api/v2/organizations/{organization}/templates Returns a list of templates for the specified organization.
Create template by organization POST
/api/v2/organizations/{organization}/templates
Get templates by organization and template name GET
/api/v2/organizations/{organization}/templates/{templatename}
Get template version by organization, template, and name GET
/api/v2/organizations/{organization}/templates/{templatename}/versions/{templateversionname}
Get previous template version by organization, template, and name GET
/api/v2/organizations/{organization}/templates/{templatename}/versions/{templateversionname}/previous
Create template version by organization POST
/api/v2/organizations/{organization}/templateversions
Get all templates GET
/api/v2/templates Returns a list of templates.
Get template examples GET
/api/v2/templates/examples
Get template settings by ID GET
/api/v2/templates/{template}
Delete template by ID DELETE
/api/v2/templates/{template}
Update template settings by ID PATCH
/api/v2/templates/{template}
Get template DAUs by ID GET
/api/v2/templates/{template}/daus
List template versions by template ID GET
/api/v2/templates/{template}/versions
Update active template version by template ID PATCH
/api/v2/templates/{template}/versions
Archive template unused versions by template id POST
/api/v2/templates/{template}/versions/archive
Get template version by template ID and name GET
/api/v2/templates/{template}/versions/{templateversionname}
Get template version by ID GET
/api/v2/templateversions/{templateversion}
Patch template version by ID PATCH
/api/v2/templateversions/{templateversion}
Archive template version POST
/api/v2/templateversions/{templateversion}/archive
Cancel template version by ID PATCH
/api/v2/templateversions/{templateversion}/cancel
Create template version dry-run POST
/api/v2/templateversions/{templateversion}/dry-run
Get template version dry-run by job ID GET
/api/v2/templateversions/{templateversion}/dry-run/{jobID}
Cancel template version dry-run by job ID PATCH
/api/v2/templateversions/{templateversion}/dry-run/{jobID}/cancel
Get template version dry-run logs by job ID GET
/api/v2/templateversions/{templateversion}/dry-run/{jobID}/logs
Get template version dry-run matched provisioners GET
/api/v2/templateversions/{templateversion}/dry-run/{jobID}/matched-provisioners
Get template version dry-run resources by job ID GET
/api/v2/templateversions/{templateversion}/dry-run/{jobID}/resources
Open dynamic parameters WebSocket by template version GET
/api/v2/templateversions/{templateversion}/dynamic-parameters
Evaluate dynamic parameters for template version POST
/api/v2/templateversions/{templateversion}/dynamic-parameters/evaluate
Get external auth by template version GET
/api/v2/templateversions/{templateversion}/external-auth
Get logs by template version GET
/api/v2/templateversions/{templateversion}/logs
Removed: Get parameters by template version GET
/api/v2/templateversions/{templateversion}/parameters
Get template version presets GET
/api/v2/templateversions/{templateversion}/presets
Get resources by template version GET
/api/v2/templateversions/{templateversion}/resources
Get rich parameters by template version GET
/api/v2/templateversions/{templateversion}/rich-parameters
Removed: Get schema by template version GET
/api/v2/templateversions/{templateversion}/schema
Unarchive template version POST
/api/v2/templateversions/{templateversion}/unarchive
Get template variables by template version GET
/api/v2/templateversions/{templateversion}/variables
Get template examples by organization GET Deprecated endpoint
/api/v2/organizations/{organization}/templates/examples
Users
Get users GET
/api/v2/users
Create new user POST
/api/v2/users
Get authentication methods GET
/api/v2/users/authmethods
Check initial user created GET
/api/v2/users/first
Create initial user POST
/api/v2/users/first
Log out user POST
/api/v2/users/logout
OAuth 2.0 GitHub Callback GET
/api/v2/users/oauth2/github/callback
Get Github device auth. GET
/api/v2/users/oauth2/github/device
Get OIDC claims for the authenticated user GET
/api/v2/users/oidc-claims
OpenID Connect Callback GET
/api/v2/users/oidc/callback
Get user by name GET
/api/v2/users/{user}
Delete user DELETE
/api/v2/users/{user}
Get user appearance settings GET
/api/v2/users/{user}/appearance
Update user appearance settings PUT
/api/v2/users/{user}/appearance
Get user Git SSH key GET
/api/v2/users/{user}/gitsshkey
Regenerate user SSH key PUT
/api/v2/users/{user}/gitsshkey
Create new session key POST
/api/v2/users/{user}/keys
Get user tokens GET
/api/v2/users/{user}/keys/tokens
Create token API key POST
/api/v2/users/{user}/keys/tokens
Get API key by token name GET
/api/v2/users/{user}/keys/tokens/{keyname}
Get API key by ID GET
/api/v2/users/{user}/keys/{keyid}
Delete API key DELETE
/api/v2/users/{user}/keys/{keyid}
Expire API key PUT
/api/v2/users/{user}/keys/{keyid}/expire
Get user login type GET
/api/v2/users/{user}/login-type
Get organizations by user GET
/api/v2/users/{user}/organizations
Get organization by user and organization name GET
/api/v2/users/{user}/organizations/{organizationname}
Update user password PUT
/api/v2/users/{user}/password
Get user preference settings GET
/api/v2/users/{user}/preferences
Update user preference settings PUT
/api/v2/users/{user}/preferences
Update user profile PUT
/api/v2/users/{user}/profile
Get user roles GET
/api/v2/users/{user}/roles
Assign role to user PUT
/api/v2/users/{user}/roles
Activate user account PUT
/api/v2/users/{user}/status/activate
Suspend user account PUT
/api/v2/users/{user}/status/suspend
WorkspaceProxies
Get site-wide regions for workspace connections GET
/api/v2/regions
Workspaces
Get users available for workspace creation GET
/api/v2/organizations/{organization}/members/{user}/workspaces/available-users
Get workspace metadata by user and workspace name GET
/api/v2/users/{user}/workspace/{workspacename}
Create user workspace POST
/api/v2/users/{user}/workspaces Create a new workspace using a template.
List workspaces GET
/api/v2/workspaces
Get workspace metadata by ID GET
/api/v2/workspaces/{workspace}
Update workspace metadata by ID PATCH
/api/v2/workspaces/{workspace}
Get workspace ACLs GET
/api/v2/workspaces/{workspace}/acl
Completely clears the workspace's user and group ACLs. DELETE
/api/v2/workspaces/{workspace}/acl
Update workspace ACL PATCH
/api/v2/workspaces/{workspace}/acl
Workspace Agent Connection Watch GET
/api/v2/workspaces/{workspace}/agent-connection-watch
Update workspace autostart schedule by ID PUT
/api/v2/workspaces/{workspace}/autostart
Update workspace automatic updates by ID PUT
/api/v2/workspaces/{workspace}/autoupdates
Update workspace dormancy status by id. PUT
/api/v2/workspaces/{workspace}/dormant
Extend workspace deadline by ID PUT
/api/v2/workspaces/{workspace}/extend
Favorite workspace by ID. PUT
/api/v2/workspaces/{workspace}/favorite
Unfavorite workspace by ID. DELETE
/api/v2/workspaces/{workspace}/favorite
Resolve workspace autostart by id. GET
/api/v2/workspaces/{workspace}/resolve-autostart
Get workspace timings by ID GET
/api/v2/workspaces/{workspace}/timings
Update workspace TTL by ID PUT
/api/v2/workspaces/{workspace}/ttl
Post Workspace Usage by ID POST
/api/v2/workspaces/{workspace}/usage
Watch workspace by ID via WebSockets GET
/api/v2/workspaces/{workspace}/watch-ws
Create user workspace by organization POST Deprecated endpoint
/api/v2/organizations/{organization}/members/{user}/workspaces Create a new workspace using a template.
Watch workspace by ID GET Deprecated endpoint
/api/v2/workspaces/{workspace}/watch