Skip to main content

Overview

Admin user management APIs enable administrators to create, update, and manage user accounts including companies, drivers, and their verification status. All endpoints require admin authorization.

List Companies

Retrieve a paginated list of companies with search and filtering capabilities.
curl -X GET "https://api.masareagle.com/api/admin/companies?page=1&pageSize=20" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Query Parameters

page
integer
default:"1"
Page number
pageSize
integer
default:"20"
Number of results per page
Search by company name or email

Response

items
array
Array of company objects
totalCount
integer
Total number of companies
page
integer
Current page number
pageSize
integer
Results per page

Create Company

Create a new company account. Login credentials are sent via email.
curl -X POST "https://api.masareagle.com/api/admin/companies" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123!",
    "name": "Premium Transport Co.",
    "note": "VIP client - priority support"
  }'

Body Parameters

email
string
required
Company email address (used for login)
password
string
required
Initial password for the company account
name
string
Company name
note
string
Admin notes about the company

Response

id
string
Created company identifier
email
string
Company email address
name
string
Company name
createdAt
string
Creation timestamp

Get Company by ID

Retrieve detailed information about a specific company.
curl -X GET "https://api.masareagle.com/api/admin/companies/{companyId}" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Path Parameters

companyId
string
required
Company identifier

Update Company

Update company information.
curl -X PUT "https://api.masareagle.com/api/admin/companies/{companyId}" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Company Name",
    "isActive": true
  }'

Path Parameters

companyId
string
required
Company identifier

Body Parameters

name
string
Company name
isActive
boolean
Whether the company is active

Delete Company

Delete a company account (logical deletion).
curl -X DELETE "https://api.masareagle.com/api/admin/companies/{companyId}" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Path Parameters

companyId
string
required
Company identifier

List Company Drivers

Retrieve all drivers associated with a specific company.
curl -X GET "https://api.masareagle.com/api/admin/companies/{companyId}/drivers" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Path Parameters

companyId
string
required
Company identifier

Driver Verification Reviews

List Driver Reviews

Retrieve all drivers who have submitted their profile for verification review.
curl -X GET "https://api.masareagle.com/api/admin/driver-verification-reviews" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Response

reviews
array
Array of driver review summaries
This endpoint returns drivers with UnderReview or ActionNeeded verification status. These are the profiles that appear in the admin dashboard for verification.

Get Driver Review Details

Retrieve detailed review information for a specific driver’s verification submission.
curl -X GET "https://api.masareagle.com/api/admin/driver-verification-reviews/{driverId}" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Path Parameters

driverId
string
required
Driver identifier

Update Driver Review Field

Update the review status of a specific field in the driver’s profile.
curl -X PATCH "https://api.masareagle.com/api/admin/driver-verification-reviews/{driverId}/fields/{field}" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "Approved",
    "notes": "All documents verified"
  }'

Path Parameters

driverId
string
required
Driver identifier
field
string
required
Field name (PersonalInformation, IdentityDocument, DrivingLicense, VehicleInformation)

Body Parameters

status
string
required
Review status (Approved, Rejected, PendingChanges)
notes
string
Admin notes or feedback for the driver

Finalize Driver Review

Finalize the driver verification review and update their overall status.
curl -X POST "https://api.masareagle.com/api/admin/driver-verification-reviews/{driverId}/finalize" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "approved": true,
    "notes": "Driver approved - all documents valid"
  }'

Path Parameters

driverId
string
required
Driver identifier

Body Parameters

approved
boolean
required
Whether to approve the driver
notes
string
Final notes for the driver
Finalizing a review will change the driver’s verification status to either Approved or ActionNeeded depending on the decision.

Build docs developers (and LLMs) love