Skip to main content

Endpoint

POST /api/v1/keys/{id}/activate
Host: api.driftguard.dev
Activating a key sets is_active back to true. Requests made with the key will be accepted again immediately. Only keys that have been revoked can be activated — keys that have been hard deleted cannot be recovered.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe key ID to reactivate — from GET /api/v1/keys

Request

curl -s -X POST https://api.driftguard.dev/api/v1/keys/your_key_id_here/activate \
  -H "X-API-Key: $DRIFTGUARD_KEY"

Response

{
  "id": "your_key_id_here",
  "is_active": true,
  "environment": "live",
  "key_preview": "dg_live_xxxxxxxx"
}

Response Fields

FieldTypeDescription
idstringThe key that was reactivated
is_activebooleanAlways true after a successful activate
environmentstringlive or test
key_previewstringFirst 16 characters of the key for identification

Error Responses

StatusMeaning
401Missing or invalid X-API-Key
404Key not found, or belongs to a different user
429Rate limit exceeded — 100 req/min per key

Revoke Key

Deactivate a key again if needed.

List Keys

View all keys and their current active status.