Secrets

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

Changed on
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)
  • Auth
    HTTP bearer

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_atstring date-time required
idinteger required
include_in_previewboolean required
keystring required
project_idinteger required
updated_atstring date-time required

Changes

    • breaking

      the created_at response's property type changed from integer to string, and format from int64 to date-time for status

    • breaking

      the updated_at response's property type changed from integer to string, and format from int64 to date-time for status

    • info

      the endpoint scheme security bearer_auth was added to the API