API Keys Management
Staff endpoints to manage API keys programmatically.
Staff Access
These endpoints require an ADMIN or OWNER role.
List API Keys
curl https://mc-prd.duckdns.org/api/v1/staff/api-keys \
-H "X-API-Key: YOUR_API_KEY"
Response 200:
{
"data": [
{
"id": "key_123",
"name": "Production API Key",
"prefix": "mk_",
"scopes": ["appointments:read", "appointments:write"],
"organizationId": 1,
"createdAt": "2026-01-15T10:00:00Z",
"lastUsedAt": "2026-01-22T08:30:00Z",
"expiresAt": null
}
]
}
Create an API Key
curl -X POST https://mc-prd.duckdns.org/api/v1/staff/api-keys \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Integration Key",
"scopes": ["appointments:read"],
"organizationId": 1,
"expiresInDays": 365
}'
Revoke an API Key
curl -X DELETE https://mc-prd.duckdns.org/api/v1/staff/api-keys/key_123 \
-H "X-API-Key: YOUR_API_KEY"
View Available Scopes
See Scopes for the complete list of permissions.