停用当前 API 密钥
OpenAPI 契约
- 方法
- POST
- 路径
/api/v1/api-keys/self-disable- 认证
- automationKey (bearer)
- 响应状态
- 204 400 401 403 404 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"204": {
"description": "Calling API key disabled",
"content": {}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Requested API key was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/api-keys/self-disable 只接受 nfy_ automation key。它不要求 scope,并会立即停用用于认证本次请求的同一密钥。成功响应没有 body。
当集成检测到凭据可能泄露时,请使用此 endpoint。响应返回后,该密钥无法再进行认证,因此使用它重复请求会被拒绝。之后账户所有者可通过 dashboard JWT 和更新操作检查并重新启用它,除非该密钥已经被永久 revoke。
http
POST /api/v1/api-keys/self-disable
Authorization: Bearer <nfy_ key>