/api/admin prefix with sub-routes for users (/users), categories (/categories), skills (/skills), and escrow (/escrow).
User management
GET /api/admin/users/get-clients
Retrieve a list of all registered client accounts. Auth required: Yes —admin role
Response
Array of client user objects includingname, email, status, role, and profile details.
cURL
GET /api/admin/users/get-freelancers
Retrieve a list of all registered freelancer accounts. Auth required: Yes —admin role
Response
Array of freelancer user objects includingname, email, status, role, and profile details.
cURL
PUT /api/admin/users/block-freelancer/:freelancerId
Block a freelancer account. The user’sstatus is set to blocked, preventing login.
Auth required: Yes — admin role
Path parameters
MongoDB ObjectId of the freelancer to block.
Response
Confirmation that the account was blocked.
cURL
PUT /api/admin/users/unblock-freelancer/:freelancerId
Restore access to a blocked freelancer account. Auth required: Yes —admin role
Path parameters
MongoDB ObjectId of the freelancer to unblock.
Response
Confirmation that the account was unblocked.
cURL
PUT /api/admin/users/block-client/:clientId
Block a client account, preventing login and job posting. Auth required: Yes —admin role
Path parameters
MongoDB ObjectId of the client to block.
Response
Confirmation that the account was blocked.
cURL
PUT /api/admin/users/unblock-client/:clientId
Restore access to a blocked client account. Auth required: Yes —admin role
Path parameters
MongoDB ObjectId of the client to unblock.
Response
Confirmation that the account was unblocked.
cURL
Category management
POST /api/admin/categories/add-category
Create a new job category. Auth required: Yes —admin role
Request body
Display name for the category (e.g.,
"Web Development").Response
Confirmation that the category was added.
The created category document.
cURL
PUT /api/admin/categories/edit-category/:id
Update an existing category’s name. Auth required: Yes —admin role
Path parameters
MongoDB ObjectId of the category to update.
Request body
New category name.
Response
The updated category document.cURL
GET /api/admin/categories/get-categories
Retrieve all job categories. This endpoint is publicly accessible and is used to populate category dropdowns on job creation forms. Auth required: NoResponse
Array of category objects with_id, name, and isListed.
cURL
PUT /api/admin/categories/list-category/:id
Set a category’sisListed to true, making it visible in the job creation form.
Auth required: Yes — admin role
Path parameters
MongoDB ObjectId of the category.
Response
Confirmation that the category was listed.
cURL
PUT /api/admin/categories/unlist-category/:id
Set a category’sisListed to false, hiding it from the job creation form without deleting it.
Auth required: Yes — admin role
Path parameters
MongoDB ObjectId of the category.
Response
Confirmation that the category was unlisted.
cURL
Skills management
POST /api/admin/skills/add-skills
Add a new skill to the platform’s skill library. Auth required: Yes —admin role
Request body
Display name for the skill (e.g.,
"React").Response
Confirmation that the skill was added.
The created skill document.
cURL
PUT /api/admin/skills/edit-skills/:id
Update an existing skill’s name. Auth required: Yes —admin role
Path parameters
MongoDB ObjectId of the skill to update.
Request body
New skill name.
Response
The updated skill document.cURL
GET /api/admin/skills/get-skills
Retrieve all skills. Publicly accessible; used to populate skill-selection dropdowns. Auth required: NoResponse
Array of skill objects with_id, name, and isListed.
cURL
PUT /api/admin/skills/list-skills/:id
Set a skill’sisListed to true.
Auth required: Yes — admin role
Path parameters
MongoDB ObjectId of the skill.
Response
Confirmation that the skill was listed.
cURL
PUT /api/admin/skills/unlist-skills/:id
Set a skill’sisListed to false, hiding it from skill-selection dropdowns without deleting it.
Auth required: Yes — admin role
Path parameters
MongoDB ObjectId of the skill.
Response
Confirmation that the skill was unlisted.
cURL
Escrow management
GET /api/admin/escrow/total-revenue
Retrieve the total platform revenue earned from all completed transactions. Platform revenue is the sum of allplatformFee values on escrow records.
Auth required: Yes — admin role
Response
Total platform revenue in INR.
cURL
GET /api/admin/escrow/balance
Retrieve the total amount currently held in escrow across all active contracts. Auth required: Yes —admin role
Response
Total escrow balance in INR — sum of
amount on all funded escrow records.cURL
PUT /api/admin/escrow/release-fund/:contractId
Approve a pending fund-release request and transfer earnings to the freelancer’s wallet. See Payments endpoints for full context. Auth required: Yes —admin role
Path parameters
MongoDB ObjectId of the contract.
Response
Confirmation that the funds were released.
Updated escrow record with
status: "released".cURL
PUT /api/admin/escrow/refund-client/:contractId/:clientId
Refund the escrowed amount to the client’s wallet for a canceled or disputed contract. See Payments endpoints for full context. Auth required: Yes —admin or client role
Path parameters
MongoDB ObjectId of the contract.
MongoDB ObjectId of the client to refund.
Request body
Short reason code for the refund.
Detailed explanation of the reason.
Response
Confirmation that the refund was processed.
Updated escrow record with
status: "refunded".cURL
GET /api/admin/escrow/transactions
Retrieve a full list of all escrow transactions across the platform. Auth required: Yes —admin role
Response
Total number of escrow transaction records.
Array of escrow transaction documents.
cURL
GET /api/admin/escrow/sales-report
Retrieve aggregated sales data for admin reporting and dashboard charts. Returns the same escrow transaction dataset as/transactions — apply your own aggregation or use the frontend charting layer.
Auth required: Yes — admin role
Response
Same response shape as GET /api/admin/escrow/transactions.cURL
