Deletes an API key. Requests that use it get 401 from then on. If it was the webhook signing key, webhooks are signed with the oldest remaining key until you mark another one with Update API key.
Request#
| Path parameter | Type | Description |
|---|---|---|
id |
string | The api_key_id, for example key_0d8e4b1f7a2c96e53b0f1d84. |
This endpoint takes no body.
Example request#
curl -X DELETE https://api.tried.com.au/api-keys/key_0d8e4b1f7a2c96e53b0f1d84 \
-H "Authorization: Bearer $TRIED_API_KEY"await fetch("https://api.tried.com.au/api-keys/key_0d8e4b1f7a2c96e53b0f1d84", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});import os, requests
requests.delete(
"https://api.tried.com.au/api-keys/key_0d8e4b1f7a2c96e53b0f1d84",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)Response#
204 No Content
The response has no body. The delete is recorded in the audit log as api_key.delete.
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request (this route needs the admin scope), or a dashboard member calls it (Requires role: admin or developer). |
404 |
API key not found in this workspace. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.