Xóa Key

Xóa vĩnh viễn key khỏi hệ thống.

Xóa Key vĩnh viễn

Xóa vĩnh viễn key và toàn bộ lịch sử thiết bị khỏi hệ thống.

DELETE /public/v1/key/{key}
X-API-Key: YOUR_API_KEY
Cảnh báo
Hành động này không thể hoàn tác. Mọi liên kết và thiết bị liên quan đến Key sẽ bị gỡ bỏ vĩnh viễn.

Path Parameters

Tham sốKiểuBắt buộcMô tả
keyStringMã key cần xóa.

Ví dụ Response

200 OK - Thành công

json
{
  "message": "Key deleted successfully"
}

404 Not Found - Không tìm thấy key

json
{
  "message": "Key not found"
}

Ví dụ PHP (cURL)

php
<?php
$apiKey = 'YOUR_API_KEY';
$key = 'DEMO-ONCE-30D-ABCD';
$url = 'http://' . $_SERVER['HTTP_HOST'] . "/public/v1/key/{$key}";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "X-API-Key: {$apiKey}"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

© 2026 CTDOAPIKEY Documentation