DELETE /admin/api-keys/{id}

Delete an API key and ALL its associated devices. This action is irreversible!

Path parameters

  • id integer Required

Responses

  • 200 application/json

    API key deleted successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
  • 401 application/json

    Unauthorized - Invalid admin secret

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 404 application/json

    API key not found

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
DELETE /admin/api-keys/{id}
curl \
 --request DELETE 'http://localhost:7001/admin/api-keys/{id}' \
 --header "X-Admin-Secret: $API_KEY"
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Success",
  "data": {}
}
Response examples (401)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (404)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}