POST/v1/apps/secrets

Set a Secret

Create or replace a secret in the secret store.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields
expandarray<string>optional

Specifies which fields in the response should be expanded.

expires_atintegeroptional

The Unix timestamp for the expiry time of the secret, after which the secret deletes.

namestringrequired

A name for the secret that's unique within the scope.

payloadstringrequired

The plaintext secret value to be stored.

scopeobjectrequired

Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

2 status codes
200Successful response.
createdintegerrequired

Time at which the object was created. Measured in seconds since the Unix epoch.

deletedbooleanoptional

If true, indicates that this secret has been deleted

expires_atintegeroptional

The Unix timestamp for the expiry time of the secret, after which the secret deletes.

idstringrequired

Unique identifier for the object.

livemodebooleanrequired

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

namestringrequired

A name for the secret that's unique within the scope.

objectstringrequired

String representing the object's type. Objects of the same type share the same value.

Allowed:apps.secret
payloadstringoptional

The plaintext secret value to be stored.

scopeobjectrequired
defaultError response.
errorobjectrequired

Error handling

Any other status is an error: Error response.