Secrets

Update a project secret. Value rotation requires a redeploy to take effect — running containers keep their currently-mounted values until the next deployment.

put/projects/{project_id}/secrets/{secret_id}

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/secrets/{secret_id}
  • Auth: none declared

Path parameters

project_idinteger required

Project ID

secret_idinteger required

Secret ID

Request body

compose_servicesstring[]

Docker Compose services allowed to read this secret, by compose service name. Empty (the default) delivers it to every service in the stack, which is how secrets behaved before scoping existed.

Ignored by non-Compose presets: those deploy a single container, which always receives every secret in scope for its environment.

environment_idsinteger[]
include_in_previewboolean
valuestring nullable

New plaintext value, <= 1 MiB. Omit to keep the existing value.

Response

Secret updated

compose_servicesstring[] required

Compose services this secret is restricted to. Empty means every service in the stack.

created_atinteger required
idinteger required
include_in_previewboolean required
keystring required
project_idinteger required
updated_atinteger required

Changes

No recorded changes to this operation across all 50 revisions of this API.