Access Control API

Control access permissions and manage entry points

Access Control

Control access permissions and manage entry points. The Access Control API allows you to manage access cards, permissions, and entry logs.

POST /api/v1/access/grant

Grant temporary or permanent access to a user or credential.

Request Example

⎘ Copy
curl -X POST "https://api.lexoh.com/v1/access/grant" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user_123",
    "device_id": "device_456",
    "duration": "24h"
  }'

Parameters

Parameter Type Required Description
user_id string Yes User identifier
device_id string Yes Target device/gate ID
duration string No Access duration (e.g., "24h", "permanent")

Response Example

{
  "status": "granted",
  "access_id": "acc_789012",
  "expires_at": "2024-01-16T10:30:00Z"
}
POST /api/v1/access/revoke

Revoke access permissions for a user or credential.

⎘ Copy
curl -X POST "https://api.lexoh.com/v1/access/revoke" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "access_id": "acc_789012"
  }'
GET /api/v1/access/permissions

List all active access permissions in your system.

POST /api/v1/access/unlock

Remotely unlock a door or gate for one-time access.

💡 Access Control Best Practices
  • Always set expiration times for temporary access
  • Log all access grant and revoke actions
  • Use webhooks to monitor access events in real-time
  • Implement fallback mechanisms for network failures
  • Regularly audit and review access permissions

Next: Video Streams

Learn how to access live and recorded video streams

Continue to Video Streams →