Delete an API Key
DELETE /api/open/v1/keys/:idRequest parameters
Section titled “Request parameters”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Key ID, a positive integer |
Request example
Section titled “Request example”curl -X DELETE https://www.routeapi.ai/api/open/v1/keys/12 \ -H "Authorization: Bearer $ROUTEAPI_MANAGEMENT_KEY"Response example
Section titled “Response example”{ "success": true, "message": "", "data": null}Errors
Section titled “Errors”| HTTP | code | Scenario |
|---|---|---|
| 400 | invalid_request | id is not a positive integer |
| 404 | not_found | The Key does not exist or does not belong to you |
For other common error codes, see Platform API errors.
- Deletion cannot be undone, and model requests using the Key fail immediately. If you only need to stop a Key temporarily, send
{"status": 2}to the update endpoint instead; deletion is the permanent option. - Deleting a Key through the Platform API is recorded in the audit log.