GET /api/v1/keys
List all API keys (secret values are never returned after creation).
Auth required: Yes (session token only)
bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://api.example.com/api/v1/keysPOST /api/v1/keys
Create a new scoped API key. The full secret is returned only once.
Auth required: Yes (session token only)
bash
curl -X POST https://api.example.com/api/v1/keys \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-app",
"permissions": ["files.read", "files.write", "folders.read"],
"expires_days": 365
}'Response:
json
{
"success": true,
"data": {
"id": "key_new",
"name": "my-app",
"key_prefix": "mk_live_abc1...",
"secret_key": "YOUR_API_KEY",
"permissions": ["files.read", "files.write", "folders.read"],
"created_at": "2026-09-19T16:30:00Z"
}
}DELETE /api/v1/keys/{id}
Revoke an API key. The key immediately stops working.
Auth required: Yes (session token only)
bash
curl -X DELETE https://api.example.com/api/v1/keys/key_abc \
-H "Authorization: Bearer YOUR_TOKEN"