Skip to main content
POST
Create or update Secret

Authorizations

Authorization
string
header
required

A Fly API token with access to the requested organization or resource. Send it as Authorization: Bearer <Fly API token>.

Path Parameters

app_name
string
required

Fly App Name

secret_name
string
required

App secret name

Body

application/json

Create app secret request

value
string

New value of the secret.

Response

Created

Version
integer

Same value as version.

Deprecated: use version.

created_at
string

When the secret was first set. Only returned when reading secrets.

digest
string

Short fingerprint of the value, to tell whether it changed without revealing it. Omitted for deleted secrets.

name
string

Name of the secret.

updated_at
string

When the secret's value last changed. Only returned when reading secrets.

value
string

Value of the secret. Only returned with show_secrets=true, and when setting secrets.

version
integer

The app's secrets version after this change. Pass it as min_secrets_version when creating or updating Machines so that they are guaranteed to see the change.