Coder General API
The General API from Coder — 10 operation(s) for general.
The General API from Coder — 10 operation(s) for general.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/coder-general-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: Coderd is the service created by running coder server. It is a thin API that connects workspaces, provisioners and users. coderd stores its state in Postgres and is the only service that communicates with Postgres.
title: Coder Agents General API
termsOfService: https://coder.com/legal/terms-of-service
contact:
name: API Support
url: https://coder.com
email: support@coder.com
license:
name: AGPL-3.0
url: https://github.com/coder/coder/blob/main/LICENSE
version: '2.0'
servers:
- url: https://{coderHost}/api/v2
description: Coder instance
variables:
coderHost:
default: coder.example.com
description: Your Coder deployment hostname
security:
- CoderSessionToken: []
tags:
- name: General
paths:
/api/v2/:
get:
operationId: api-root-handler
summary: API root handler
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.Response'
/api/v2/buildinfo:
get:
operationId: build-info
summary: Build info
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.BuildInfoResponse'
/api/v2/csp/reports:
post:
operationId: report-csp-violations
summary: Report CSP violations
tags:
- General
security:
- CoderSessionToken: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/coderd.cspViolation'
responses:
'200':
description: OK
/api/v2/deployment/config:
get:
operationId: get-deployment-config
summary: Get deployment config
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.DeploymentConfig'
/api/v2/deployment/ssh:
get:
operationId: ssh-config
summary: SSH Config
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.SSHConfigResponse'
/api/v2/deployment/stats:
get:
operationId: get-deployment-stats
summary: Get deployment stats
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.DeploymentStats'
/api/v2/experiments:
get:
operationId: get-enabled-experiments
summary: Get enabled experiments
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/codersdk.Experiment'
/api/v2/experiments/available:
get:
operationId: get-safe-experiments
summary: Get safe experiments
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/codersdk.Experiment'
/api/v2/updatecheck:
get:
operationId: update-check
summary: Update check
tags:
- General
security:
- CoderSessionToken: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.UpdateCheckResponse'
/api/v2/users/{user}/keys/tokens/tokenconfig:
get:
operationId: get-token-config
summary: Get token config
tags:
- General
security:
- CoderSessionToken: []
parameters:
- name: user
in: path
required: true
description: User ID, name, or me
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.TokenConfig'
components:
schemas:
codersdk.DERPConfig:
type: object
properties:
block_direct:
type: boolean
force_websockets:
type: boolean
path:
type: string
url:
type: string
codersdk.TokenConfig:
type: object
properties:
max_token_lifetime:
type: integer
codersdk.NotificationsWebhookConfig:
type: object
properties:
endpoint:
description: The URL to which the payload will be sent with an HTTP POST request.
allOf:
- $ref: '#/components/schemas/serpent.URL'
codersdk.SSHConfig:
type: object
properties:
deploymentName:
type: string
description: DeploymentName is the config-ssh Hostname prefix
sshconfigOptions:
type: array
description: 'SSHConfigOptions are additional options to add to the ssh config file.
This will override defaults.'
items:
type: string
codersdk.ExternalAuthConfig:
type: object
properties:
api_base_url:
type: string
description: 'APIBaseURL is the base URL for provider REST API calls
(e.g., "https://api.github.com" for GitHub). Derived from
defaults when not explicitly configured.'
app_install_url:
type: string
app_installations_url:
type: string
auth_url:
type: string
client_id:
type: string
code_challenge_methods_supported:
type: array
description: 'CodeChallengeMethodsSupported lists the PKCE code challenge methods
The only one supported by Coder is "S256".'
items:
type: string
device_code_url:
type: string
device_flow:
type: boolean
display_icon:
type: string
description: DisplayIcon is a URL to an icon to display in the UI.
display_name:
type: string
description: DisplayName is shown in the UI to identify the auth config.
id:
type: string
description: 'ID is a unique identifier for the auth config.
It defaults to `type` when not provided.'
mcp_tool_allow_regex:
type: string
description: 'Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.'
mcp_tool_deny_regex:
type: string
description: 'Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.'
mcp_url:
type: string
description: 'Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.'
no_refresh:
type: boolean
regex:
type: string
description: 'Regex allows API requesters to match an auth config by
a string (e.g. coder.com) instead of by it''s type.
Git clone makes use of this by parsing the URL from:
''Username for "https://github.com":''
And sending it to the Coder server to match against the Regex.'
revoke_url:
type: string
scopes:
type: array
items:
type: string
token_url:
type: string
type:
type: string
description: Type is the type of external auth config.
validate_url:
type: string
codersdk.NotificationsConfig:
type: object
properties:
dispatch_timeout:
type: integer
description: How long to wait while a notification is being sent before giving up.
email:
description: SMTP settings.
allOf:
- $ref: '#/components/schemas/codersdk.NotificationsEmailConfig'
fetch_interval:
type: integer
description: How often to query the database for queued notifications.
inbox:
description: Inbox settings.
allOf:
- $ref: '#/components/schemas/codersdk.NotificationsInboxConfig'
lease_count:
type: integer
description: How many notifications a notifier should lease per fetch interval.
lease_period:
type: integer
description: 'How long a notifier should lease a message. This is effectively how long a notification is ''owned''
by a notifier, and once this period expires it will be available for lease by another notifier. Leasing
is important in order for multiple running notifiers to not pick the same messages to deliver concurrently.
This lease period will only expire if a notifier shuts down ungracefully; a dispatch of the notification
releases the lease.'
max_send_attempts:
type: integer
description: The upper limit of attempts to send a notification.
method:
type: string
description: 'Which delivery method to use (available options: ''smtp'', ''webhook'').'
retry_interval:
type: integer
description: The minimum time between retries.
sync_buffer_size:
type: integer
description: 'The notifications system buffers message updates in memory to ease pressure on the database.
This option controls how many updates are kept in memory. The lower this value the
lower the change of state inconsistency in a non-graceful shutdown - but it also increases load on the
database. It is recommended to keep this option at its default value.'
sync_interval:
type: integer
description: 'The notifications system buffers message updates in memory to ease pressure on the database.
This option controls how often it synchronizes its state with the database. The shorter this value the
lower the change of state inconsistency in a non-graceful shutdown - but it also increases load on the
database. It is recommended to keep this option at its default value.'
webhook:
description: Webhook settings.
allOf:
- $ref: '#/components/schemas/codersdk.NotificationsWebhookConfig'
codersdk.NotificationsEmailTLSConfig:
type: object
properties:
ca_file:
type: string
description: CAFile specifies the location of the CA certificate to use.
cert_file:
type: string
description: CertFile specifies the location of the certificate to use.
insecure_skip_verify:
type: boolean
description: InsecureSkipVerify skips target certificate validation.
key_file:
type: string
description: KeyFile specifies the location of the key to use.
server_name:
type: string
description: ServerName to verify the hostname for the targets.
start_tls:
type: boolean
description: StartTLS attempts to upgrade plain connections to TLS.
codersdk.SSHConfigResponse:
type: object
properties:
hostname_prefix:
type: string
description: 'HostnamePrefix is the prefix we append to workspace names for SSH hostnames.
Deprecated: use HostnameSuffix instead.'
hostname_suffix:
type: string
description: HostnameSuffix is the suffix to append to workspace names for SSH hostnames.
ssh_config_options:
type: object
additionalProperties:
type: string
codersdk.UserQuietHoursScheduleConfig:
type: object
properties:
allow_user_custom:
type: boolean
default_schedule:
type: string
codersdk.HTTPCookieConfig:
type: object
properties:
host_prefix:
type: boolean
same_site:
type: string
secure_auth_cookie:
type: boolean
codersdk.OIDCConfig:
type: object
properties:
allow_signups:
type: boolean
auth_url_params:
type: object
client_cert_file:
type: string
client_id:
type: string
client_key_file:
type: string
description: ClientKeyFile & ClientCertFile are used in place of ClientSecret for PKI auth.
client_secret:
type: string
email_domain:
type: array
items:
type: string
email_field:
type: string
group_allow_list:
type: array
items:
type: string
group_auto_create:
type: boolean
group_mapping:
type: object
group_regex_filter:
$ref: '#/components/schemas/serpent.Regexp'
groups_field:
type: string
icon_url:
$ref: '#/components/schemas/serpent.URL'
ignore_email_verified:
type: boolean
ignore_user_info:
type: boolean
description: 'IgnoreUserInfo & UserInfoFromAccessToken are mutually exclusive. Only 1
can be set to true. Ideally this would be an enum with 3 states, [''none'',
''userinfo'', ''access_token'']. However, for backward compatibility,
`ignore_user_info` must remain. And `access_token` is a niche, non-spec
compliant edge case. So it''s use is rare, and should not be advised.'
issuer_url:
type: string
name_field:
type: string
organization_assign_default:
type: boolean
organization_field:
type: string
organization_mapping:
type: object
redirect_url:
description: 'RedirectURL is optional, defaulting to ''ACCESS_URL''. Only useful in niche
situations where the OIDC callback domain is different from the ACCESS_URL
domain.'
allOf:
- $ref: '#/components/schemas/serpent.URL'
scopes:
type: array
items:
type: string
sign_in_text:
type: string
signups_disabled_text:
type: string
skip_issuer_checks:
type: boolean
source_user_info_from_access_token:
type: boolean
description: 'UserInfoFromAccessToken as mentioned above is an edge case. This allows
sourcing the user_info from the access token itself instead of a user_info
endpoint. This assumes the access token is a valid JWT with a set of claims to
be merged with the id_token.'
user_role_field:
type: string
user_role_mapping:
type: object
user_roles_default:
type: array
items:
type: string
username_field:
type: string
serpent.HostPort:
type: object
properties:
host:
type: string
port:
type: string
codersdk.LinkConfig:
type: object
properties:
icon:
type: string
enum:
- bug
- chat
- docs
- star
location:
type: string
enum:
- navbar
- dropdown
name:
type: string
target:
type: string
codersdk.AIBridgeConfig:
type: object
properties:
allow_byok:
type: boolean
anthropic:
description: 'Deprecated: Use Providers with indexed CODER_AI_GATEWAY_PROVIDER_<N>_* env vars instead.'
allOf:
- $ref: '#/components/schemas/codersdk.AIBridgeAnthropicConfig'
api_dump_dir:
type: string
description: 'APIDumpDir is the base directory under which each provider''s
request/response dumps are written, in a subdirectory named after
the provider. Empty disables dumping.'
bedrock:
description: 'Deprecated: Use Providers with indexed CODER_AI_GATEWAY_PROVIDER_<N>_* env vars instead.'
allOf:
- $ref: '#/components/schemas/codersdk.AIBridgeBedrockConfig'
budget_period:
type: string
budget_policy:
type: string
description: Budget settings for AI Governance cost controls.
circuit_breaker_enabled:
type: boolean
description: 'Circuit breaker protects against cascading failures from upstream AI
provider overload (503, 529).'
circuit_breaker_failure_threshold:
type: integer
circuit_breaker_interval:
type: integer
circuit_breaker_max_requests:
type: integer
circuit_breaker_timeout:
type: integer
enabled:
type: boolean
inject_coder_mcp_tools:
type: boolean
description: 'Deprecated: Injected MCP in AI Bridge is deprecated and will be removed in a future release.'
max_concurrency:
type: integer
openai:
description: 'Deprecated: Use Providers with indexed CODER_AI_GATEWAY_PROVIDER_<N>_* env vars instead.'
allOf:
- $ref: '#/components/schemas/codersdk.AIBridgeOpenAIConfig'
providers:
type: array
description: 'Providers holds provider instances populated from CODER_AI_GATEWAY_PROVIDER_<N>_<KEY>
env vars and/or the deprecated LegacyOpenAI/LegacyAnthropic/LegacyBedrock fields above.'
items:
$ref: '#/components/schemas/codersdk.AIProviderConfig'
rate_limit:
type: integer
retention:
type: integer
send_actor_headers:
type: boolean
structured_logging:
type: boolean
codersdk.DERP:
type: object
properties:
config:
$ref: '#/components/schemas/codersdk.DERPConfig'
server:
$ref: '#/components/schemas/codersdk.DERPServerConfig'
codersdk.StatsCollectionConfig:
type: object
properties:
usage_stats:
$ref: '#/components/schemas/codersdk.UsageStatsConfig'
codersdk.RateLimitConfig:
type: object
properties:
api:
type: integer
disable_all:
type: boolean
serpent.Option:
type: object
properties:
annotations:
description: 'Annotations enable extensions to serpent higher up in the stack. It''s useful for
help formatting and documentation generation.'
allOf:
- $ref: '#/components/schemas/serpent.Annotations'
default:
type: string
description: 'Default is parsed into Value if set.
Must be `""` if `DefaultFn` != nil'
description:
type: string
env:
type: string
description: 'Env is the environment variable used to configure this option. If unset,
environment configuring is disabled.'
flag:
type: string
description: 'Flag is the long name of the flag used to configure this option. If unset,
flag configuring is disabled.'
flag_shorthand:
type: string
description: 'FlagShorthand is the one-character shorthand for the flag. If unset, no
shorthand is used.'
group:
description: 'Group is a group hierarchy that helps organize this option in help, configs
and other documentation.'
allOf:
- $ref: '#/components/schemas/serpent.Group'
hidden:
type: boolean
name:
type: string
required:
type: boolean
description: 'Required means this value must be set by some means. It requires
`ValueSource != ValueSourceNone`
If `Default` is set, then `Required` is ignored.'
use_instead:
type: array
description: 'UseInstead is a list of options that should be used instead of this one.
The field is used to generate a deprecation warning.'
items:
$ref: '#/components/schemas/serpent.Option'
value:
description: Value includes the types listed in values.go.
value_source:
$ref: '#/components/schemas/serpent.ValueSource'
yaml:
type: string
description: 'YAML is the YAML key used to configure this option. If unset, YAML
configuring is disabled.'
codersdk.TLSConfig:
type: object
properties:
address:
$ref: '#/components/schemas/serpent.HostPort'
allow_insecure_ciphers:
type: boolean
cert_file:
type: array
items:
type: string
client_auth:
type: string
client_ca_file:
type: string
client_cert_file:
type: string
client_key_file:
type: string
enable:
type: boolean
key_file:
type: array
items:
type: string
min_version:
type: string
redirect_http:
type: boolean
supported_ciphers:
type: array
items:
type: string
codersdk.PrometheusConfig:
type: object
properties:
address:
$ref: '#/components/schemas/serpent.HostPort'
aggregate_agent_stats_by:
type: array
items:
type: string
collect_agent_stats:
type: boolean
collect_db_metrics:
type: boolean
enable:
type: boolean
url.Userinfo:
type: object
codersdk.TemplateBuilderConfig:
type: object
properties:
disabled:
type: boolean
registry_url:
type: string
codersdk.WorkspaceConnectionLatencyMS:
type: object
properties:
p50:
type: number
format: float64
p95:
type: number
format: float64
codersdk.ProvisionerConfig:
type: object
properties:
daemon_poll_interval:
type: integer
daemon_poll_jitter:
type: integer
daemon_psk:
type: string
daemon_types:
type: array
items:
type: string
daemons:
type: integer
description: Daemons is the number of built-in terraform provisioners.
force_cancel_interval:
type: integer
coderd.cspViolation:
type: object
properties:
csp-report:
type: object
additionalProperties: true
serpent.ValueSource:
type: string
enum:
- ''
- flag
- env
- yaml
- default
codersdk.HealthcheckConfig:
type: object
properties:
refresh:
type: integer
threshold_database:
type: integer
codersdk.AIBridgeProxyConfig:
type: object
properties:
allowed_private_cidrs:
type: array
items:
type: string
api_dump_dir:
type: string
cert_file:
type: string
domain_allowlist:
type: array
items:
type: string
enabled:
type: boolean
key_file:
type: string
listen_addr:
type: string
tls_cert_file:
type: string
tls_key_file:
type: string
upstream_proxy:
type: string
upstream_proxy_ca:
type: string
codersdk.DERPServerConfig:
type: object
properties:
enable:
type: boolean
region_code:
type: string
region_id:
type: integer
region_name:
type: string
relay_url:
$ref: '#/components/schemas/serpent.URL'
stun_addresses:
type: array
items:
type: string
codersdk.NotificationsInboxConfig:
type: object
properties:
enabled:
type: boolean
codersdk.BuildInfoResponse:
type: object
properties:
agent_api_version:
type: string
description: 'AgentAPIVersion is the current version of the Agent API (back versions
MAY still be supported).'
dashboard_url:
type: string
description: 'DashboardURL is the URL to hit the deployment''s dashboard.
For external workspace proxies, this is the coderd they are connected
to.'
deployment_id:
type: string
description: DeploymentID is the unique identifier for this deployment.
external_url:
type: string
description: 'ExternalURL references the current Coder version.
For production builds, this will link directly to a release. For development builds, this will link to a commit.'
provisioner_api_version:
type: string
description: ProvisionerAPIVersion is the current version of the Provisioner API
telemetry:
type: boolean
description: Telemetry is a boolean that indicates whether telemetry is enabled.
upgrade_message:
type: string
description: 'UpgradeMessage is the message displayed to users when an outdated client
is detected.'
version:
type: string
description: Version returns the semantic version of the build.
webpush_public_key:
type: string
description: WebPushPublicKey is the public key for push notifications via Web Push.
workspace_proxy:
type: boolean
serpent.Annotations:
type: object
additionalProperties:
type: string
codersdk.AIBridgeBedrockConfig:
type: object
properties:
access_key:
type: string
access_key_secret:
type: string
base_url:
type: string
model:
type: string
region:
type: string
small_fast_model:
type: string
codersdk.Response:
type: object
properties:
detail:
type: string
description: 'Detail is a debug message that provides further insight into why the
action failed. This information can be technical and a regular golang
err.Error() text.
- "database: too many open connections"
- "stat: too many open files"'
message:
type: string
description: 'Message is an actionable message that depicts actions the request took.
These messages should be fully formed sentences with proper punctuation.
Examples:
- "A user has been created."
- "Failed to create a user."'
validations:
type: array
description: 'Validations are form field-specific friendly error messages. They will be
shown on a form field in the UI. These can also be used to add additional
context if there is a set of errors in the primary ''Message''.'
items:
$ref: '#/components/schemas/codersdk.ValidationError'
codersdk.NotificationsEmailConfig:
type: object
properties:
auth:
description: Authentication details.
allOf:
- $ref: '#/components/schemas/codersdk.NotificationsEmailAuthConfig'
force_tls:
type: boolean
description: ForceTLS causes a TLS connection to be attempted.
from:
type: string
description: The sender's address.
hello:
type: string
description: The hostname identifying the SMTP server.
smarthost:
type: string
description: The intermediary SMTP host through which emails are sent (host:port).
tls:
description: TLS details.
allOf:
- $ref: '#/components/schemas/codersdk.NotificationsEmailTLSConfig'
codersdk.AIBridgeAnthropicConfig:
type: object
properties:
base_url:
type: string
key:
type: string
codersdk.SupportConfig:
type: object
properties:
links:
$ref: '#/components/schemas/serpent.Struct-array_codersdk_LinkConfig'
codersdk.DangerousConfig:
type: object
properties:
allow_all_cors:
type: boolean
allow_path_app_sharing:
type: boolean
allow_path_app_site_owner_access:
type: boolean
codersdk.SessionLifetime:
type: object
properties:
default_duration:
type: integer
description: DefaultDuration is only for browser, workspace app and oauth sessions.
default_token_lifetime:
type: integer
disable_expiry_refresh:
type: boolean
description: 'DisableExpiryRefresh will disable automatically refreshing api
keys when they are used from the api. This means the api key lifetime at
creation is the lifetime of the api key.'
max_admin_token_lifetime:
type: integer
max_token_lifetime:
type: integer
refresh_default_duration:
type: integer
description: 'RefreshDefaultDuration is the default lifetime for OAuth2 refresh tokens.
This should generally be longer than access token lifetimes to allow
refreshing after access token expiry.'
codersdk.UsageStatsConfig:
type: object
properties:
enable:
type: boolean
codersdk.ValidationError:
type: object
properties:
detail:
type: string
field:
type: string
required:
- detail
- field
codersdk.AIProviderConfig:
type: object
properties:
base_url:
type: string
description: BaseURL is the base URL of the upstream provider API.
bedrock_model:
type: string
bedrock_region:
type: string
bedrock_small_fast_model:
type: string
name:
type: string
description: 'Name is the unique instance identifier used for routing.
Defaults to Type if not provided.'
type:
type: string
description: 'Type is the provider type. Valid values are: "openai",
"anthropic", "azure", "bedrock", "google", "openai-compat",
"openrouter", "vercel", "copilot".'
codersdk.TraceConfig:
type: object
properties:
capture_logs:
type: boolean
data_dog:
type: boolean
enable:
type: boolean
honeycomb_api_key:
type: string
codersdk.TelemetryConfig:
type: object
properties:
enable:
type: boolean
trace:
type: boolean
url:
$ref: '#/components/schemas/serpent.URL'
codersdk.NotificationsEmailAuthConfig:
type: object
properties:
identity:
type: string
description: Identity for PLAIN auth.
password:
type: string
description: Password for LOGIN/PLAIN auth.
password_file:
type: string
description: File from which to load the password for LOGIN/PLAIN auth.
username:
type: string
description: Username for LOGIN/PLAIN auth.
codersdk.Experiment:
type: string
enum:
- example
- auto-fill-parameters
- notifications
- workspace-usage
- oauth2
- mcp-server-http
- workspace-build-updates
- na
# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coder/refs/heads/main/openapi/coder-general-api-openapi.yml