Invalidate and regenerate API key
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.haveibeendrained.org/api/v1/keys/invalidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.haveibeendrained.org/api/v1/keys/invalidate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.haveibeendrained.org/api/v1/keys/invalidate"
payload = { "reason": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.haveibeendrained.org/api/v1/keys/invalidate"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"message": "<string>",
"keyId": "<string>",
"newKeyId": "<string>",
"emailSent": true,
"timestamp": 123
}{
"success": false,
"error": "<string>",
"timestamp": 123,
"message": "<string>",
"details": "<string>",
"retryAfter": 123
}API Keys
Invalidate and regenerate API key
Invalidates the API key provided in the request (via X-API-Key header or User-Agent) and generates a new one. The new key is sent to the registered email address.
POST
/
api
/
v1
/
keys
/
invalidate
Invalidate and regenerate API key
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.haveibeendrained.org/api/v1/keys/invalidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.haveibeendrained.org/api/v1/keys/invalidate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.haveibeendrained.org/api/v1/keys/invalidate"
payload = { "reason": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.haveibeendrained.org/api/v1/keys/invalidate"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"message": "<string>",
"keyId": "<string>",
"newKeyId": "<string>",
"emailSent": true,
"timestamp": 123
}{
"success": false,
"error": "<string>",
"timestamp": 123,
"message": "<string>",
"details": "<string>",
"retryAfter": 123
}Authorizations
API key for enterprise tier rate limits. Include in User-Agent or X-API-Key header.
Body
application/json
Reason for invalidation
Was this page helpful?