Skip to main content
DELETE
/
v1
/
organizations
/
secrets
/
{secret_name}
Delete Secret
curl --request DELETE \
  --url https://api.mixpeek.com/v1/organizations/secrets/{secret_name} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.mixpeek.com/v1/organizations/secrets/{secret_name}"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.mixpeek.com/v1/organizations/secrets/{secret_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/organizations/secrets/{secret_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.mixpeek.com/v1/organizations/secrets/{secret_name}"

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api.mixpeek.com/v1/organizations/secrets/{secret_name}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/organizations/secrets/{secret_name}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "secret_name": "<string>",
  "created": true,
  "updated": true,
  "deleted": true
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

secret_name
string
required

Response

Successful Response

Response for secret operations (NEVER includes actual decrypted value).

This response is returned after creating, updating, or deleting a secret. For security, the actual secret value is NEVER included in API responses. Only the secret name and operation status are returned.

Security:

  • Decrypted secret values are NEVER included
  • Only secret name and operation status returned
  • Actual value only accessible by internal services

Fields:

  • secret_name: Name of the secret that was operated on
  • created: True if secret was created (null for other operations)
  • updated: True if secret was updated (null for other operations)
  • deleted: True if secret was deleted (null for other operations)
secret_name
string
required

Name of the secret that was operated on. This is the same name provided in the request. Use this name to reference the secret in api_call stage configuration.

Examples:

"stripe_api_key"

"github_token"

"openai_api_key"

created
boolean | null

True if this secret was created, null otherwise. Only set for POST /secrets operations.

updated
boolean | null

True if this secret was updated, null otherwise. Only set for PUT /secrets/{name} operations.

deleted
boolean | null

True if this secret was deleted, null otherwise. Only set for DELETE /secrets/{name} operations.