NEW

API keys provide programmatic access without session cookies. Available on Pro and Business plans.

POST/api/api-keys
Auth Required

Generate a new API key for programmatic access.

Request Body

FieldTypeRequiredDescription
namestringYesFriendly name for the key
Example Requestjson
{
  "name": "Production Server"
}

Response 201

FieldTypeDescription
idstringKey ID
namestringKey name
keystringFull API key (only shown once)
keyPrefixstringKey prefix for identification
Example Responsejson
{
  "id": "kJx9mP2qLn4vRt7bYw3cZ",
  "name": "Production Server",
  "key": "sk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "keyPrefix": "sk_live_a1b2",
  "createdAt": "2025-01-29T12:00:00.000Z"
}

Errors

StatusMessage
401Unauthorized
403API keys not available on your plan

Rate Limits

FreeN/A (Pro only)
Pro10 req/min
Business30 req/min

Code Examples

curl -X POST https://destroy.network/api/api-keys \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Production Server"}'

The full key is only shown once. Store it securely.

Maximum 10 API keys per account.

GET/api/api-keys
Auth Required

Get all API keys for your account.

Response 200

Example Responsejson
[
  {
    "id": "kJx9mP2qLn4vRt7bYw3cZ",
    "name": "Production Server",
    "keyPrefix": "sk_live_a1b2",
    "lastUsedAt": "2025-01-29T10:00:00.000Z",
    "createdAt": "2025-01-28T12:00:00.000Z"
  }
]

Rate Limits

FreeN/A (Pro only)
Pro30 req/min
Business60 req/min

Code Examples

curl https://destroy.network/api/api-keys \
  -H "Authorization: Bearer sk_live_your_api_key"

Full keys are never returned after creation.

DELETE/api/api-keys/{id}
Auth Required

Revoke an API key.

Path Parameters

NameTypeRequiredDescription
idstringYesAPI key ID

Response 200

Example Responsejson
{
  "success": true
}

Errors

StatusMessage
404API key not found

Rate Limits

FreeN/A (Pro only)
Pro10 req/min
Business30 req/min

Code Examples

curl -X DELETE https://destroy.network/api/api-keys/kJx9mP2qLn4vRt7bYw3cZ \
  -H "Authorization: Bearer sk_live_your_api_key"