Secrets

Import user secrets from a file

Changed on
post/api/v2/users/{user}/secrets/batch

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/users/{user}/secrets/batch
  • Auth
    API key in header Coder-Session-Token

Path parameters

userstring required

User ID, username, or me

Request body

contentstring required
format'env' | 'json' | 'yaml' required

Response

Created

created_atstring date-time
descriptionstring
enabledboolean

Enabled controls whether the secret is injected into workspaces. Disabled secrets remain visible and editable, but are not added to the agent manifest, so they are not exposed as environment variables or written to secret files.

env_namestring
file_pathstring
idstring uuid
namestring
updated_atstring date-time

Changes