Create a new secret in a store

POST {{fastly_url}}/resources/stores/secret/{{store_id}}/secrets

Create a new secret in a store. Returns an error if a secret already exists with the same name. See PUT and PATCH methods for ways to recreate an existing secret. The secret field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is Hello, world!.

Authorization: API token with at least Engineer permissions.

Request Body

{"name"=>"my-secret", "secret"=>"SGVsbG8sIHdvcmxkIQ=="}

HEADERS

KeyDatatypeRequiredDescription
Hoststring
Content-Typestring
Acceptstring