API-Referenz
Einen API-Schlüssel löschen
Einen Standard-API-Schlüssel widerrufen, ohne historische Nutzungsdaten zu löschen.
Einen Standard-API-Schlüssel widerrufen, ohne historische Nutzungsdaten zu löschen.
Endpunkt
- Basis-URL
https://runapi.ai- API-Version
v1- Authentifizierung
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
02
JSON-BodyAnfrage
Werte nur am angegebenen Anfrage-Speicherort senden.
Pfadparameter1 Feld
idstring
Erforderlich
Präfix-ID des API-Schlüssels, zum Beispiel token_123.
03
HTTP 204Erfolgsantwort
DELETE /api/v1/keys/:id
Diese Antwort hat keinen Body.
04
HTTP 401Fehlerantwort (401)
Antwort-Schema
JSON
{
"properties": {
"error": {
"description": "Für Menschen lesbare Fehlermeldung.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Antwortbeispiel
JSON
{
"error": "Authentication required"
}
05
HTTP 403Fehlerantwort (403)
Antwort-Schema
JSON
{
"properties": {
"error": {
"description": "Für Menschen lesbare Fehlermeldung.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Antwortbeispiel
JSON
{
"error": "Management API key required"
}
06
HTTP 403Fehlerantwort (403)
Antwort-Schema
JSON
{
"properties": {
"error": {
"description": "Für Menschen lesbare Fehlermeldung.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Antwortbeispiel
JSON
{
"error": "Account admin required"
}
07
HTTP 404Fehlerantwort (404)
Antwort-Schema
JSON
{
"properties": {
"error": {
"description": "Für Menschen lesbare Fehlermeldung.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Antwortbeispiel
JSON
{
"error": "Resource not found"
}
08
cURL-Beispiel
CURL
curl -X DELETE https://runapi.ai/api/v1/keys/token_123 \
-H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY'