API Reference
AD Unlock provides a REST API for integration and automation.
Base URL
https://api.adunlock.meAuthentication
All API requests require authentication via Bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.adunlock.me/admin/...Admin Endpoints
List Requests
GET /admin/requestsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by status |
| from | datetime | Start date |
| to | datetime | End date |
| limit | int | Max results (default 50) |
| offset | int | Pagination offset |
Response:
{
"requests": [
{
"id": "req_abc123",
"user": "john.doe@company.com",
"action": "unlock",
"status": "completed",
"risk_score": 15,
"created_at": "2024-01-15T10:32:45Z"
}
],
"total": 150,
"limit": 50,
"offset": 0
}Get Request Details
GET /admin/requests/{request_id}Approve/Deny Request
POST /admin/requests/{request_id}/approve
POST /admin/requests/{request_id}/denyBody:
{
"comment": "Optional comment"
}List Connectors
GET /admin/connectorsGet Connector Status
GET /admin/connectors/{connector_id}List Users
GET /admin/usersEnroll User
POST /admin/usersBody:
{
"username": "john.doe",
"phone": "+5511999999999"
}Remove User
DELETE /admin/users/{user_id}Webhook Events
Incoming Message
POST /webhook/zapiEvent Payload
{
"phone": "+5511999999999",
"message": "My account is locked",
"timestamp": "2024-01-15T10:32:45Z"
}Rate Limits
| Endpoint | Limit |
|---|---|
| Admin endpoints | 100/min |
| Webhooks | 1000/min |
Errors
All errors follow this format:
{
"error": {
"code": "INVALID_REQUEST",
"message": "Detailed error message",
"details": {}
}
}See Error Codes for complete list.
Last updated on