Dashboard Login
Authenticate a dashboard user (agency staff, admin, or super admin) and receive an access token for the management dashboard. This is the entry point for all administrative operations in the Daakey platform.
Unlike the Client API, the Dashboard API does not require an agency signature. Instead, access is controlled through role-based permissions that determine what features each user can access.
Upon successful login, the response includes:
- User Information: Name, email, and role
- Organization Context: The user's associated partner and agency
- Permissions: A list of granted permissions determining accessible features
- Access Token: Bearer token for authenticating subsequent requests
Multi-Tenant Architecture
Dashboard users are scoped to their organization level:
- Super Admins: See all partners and agencies
- Partner Admins: See only their partner's agencies
- Agency Admins/Staff: See only their agency's data
Endpoint
INFO
POST /api/v1/dashboard/auth/login
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | User email address |
password | string | Yes | User password |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/dashboard/auth/login \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"email": "admin@agency.com",
"password": "password123"
}'Response
Success (200)
json
{
"success": true,
"message": "Login successful",
"data": {
"user": {
"id": 1,
"name": "Admin User",
"email": "admin@agency.com",
"role": "admin",
"agency": {
"id": 1,
"name": "Example Agency",
"code": "EXAMPLE01"
},
"partner": {
"id": 1,
"name": "Example Partner"
},
"permissions": [
"vehicles.view",
"vehicles.create",
"vehicles.edit",
"bookings.view",
"bookings.manage",
"users.view"
]
},
"token": "1|abc123def456..."
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (401)
json
{
"success": false,
"message": "Invalid credentials",
"errors": {
"email": ["These credentials do not match our records."]
},
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}User Roles
| Role | Description |
|---|---|
super_admin | Full system access |
partner_admin | Partner-level access |
agency_admin | Agency-level access |
agency_staff | Limited agency access |
Notes
- Dashboard users do not require agency signature
- Permissions determine accessible features
- Token should be included in all subsequent requests