Delete a secret

​

Deletes a secret by name for the current account and environment. The request succeeds when the name is already absent; in that case, deleted is false and id is empty.

Headers

  • Unique key used to safely retry the same store or delete request. Reuse a key only when retrying an identical request.

Body·

required
application/json

Parameters for deleting a secret.

  • Exact name of the secret to delete.

  • Account scope. Omit this field, use null, or omit type to use the current account.

    Properties: 1

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/secrets/delete
curl https://api.paypercut.io/v1/secrets/delete \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "fulfillment-api-token",
  "scope": {
    "type": "account"
  }
}'
{
  "id": "string",
  "object": "secret",
  "deleted": true
}