Skip to content

Put App Secret

PUT
/apps/{app_id}/secrets/{secret_key}

Declare a secret, or rotate where an existing one lives.

UPSERT, not create. Re-declaring a key is a rotation rather than a 409: the builder is saying the value moved, and refusing would make the common case an error and push them towards delete-then-create, which loses created_at and briefly leaves the app declaring nothing.

provider_ref is a POINTER. The DTO refuses the obvious credential shapes, which is a guardrail against the honest mistake rather than a security control: nothing can reliably tell a path from a secret, but someone pasting a value because the field sits next to the key is the likely error, and this turns a silent unrecoverable leak into a 422 they read.

Authorizations

Parameters

Path Parameters

app_id
required
string
secret_key
required
string

Header Parameters

X-Org-Id
Any of:
string

Request Body required

Declare (or rotate) one secret.

provider_ref is the ONLY writable field, and it is a pointer. A value field here would make every backup of the control plane a place credentials leak from, which is why the table has no column for one.

object
provider_ref
Any of:
string
<= 500 characters

Responses

200

Successful Response

object
data
required

One declared secret. A POINTER and two timestamps, never a value.

There is no value field and there must never be one. The control plane stores WHICH secrets an app declares and where they live, so a build can be rendered without the platform ever holding what the build will read.

object
created_at
Any of:
string format: date-time
provider_ref
Any of:
string
rotated_at
Any of:
string format: date-time
secret_key
required
string
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string