Secrets

POST /settings/secrets

Changed on

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Request body

descriptionstring nullable
mount_pathstring nullable

Required for "file" type secrets — absolute path inside the sandbox

namestring required
project_idinteger nullable

Project whose agent runs receive the secret. Omit for an instance-wide secret, which is injected into every project's agent runs and so is readable by anyone who can run an agent in any project.

secret_typestring

"env" (environment variable) or "file" (written to mount_path)

valuestring required

Response

Secret created/updated

created_atstring required
descriptionstring nullable
idinteger required
mount_pathstring nullable
namestring required
project_idinteger nullable

Project the secret is scoped to; null means instance-wide.

secret_typestring required
updated_atstring required
valuestring required

Always masked in responses

Changes

    • info

      added the new optional request property project_id

    • info

      added the non-success response with the status

    • info

      added the optional property project_id to the response with the status