Secrets

Create a new user secret

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

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
  • Auth
    API key in header Coder-Session-Token

Path parameters

userstring required

User ID, username, or me

Request body

descriptionstring
enabledboolean
env_namestring
file_pathstring
namestring
valuestring

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