Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tech-dipesh/yeti-Jobs/llms.txt

Use this file to discover all available pages before exploring further.

The Admin API gives platform administrators the tools to monitor the overall health of Yeti Jobs and manage the relationship between users and companies. The dashboard provides a live count of every major entity in the system; the assign-user endpoint links a job seeker or recruiter to a company so they gain the company-employee role; and two search endpoints let admins quickly look up users and companies by partial name. All endpoints in this group require a valid token cookie issued to an account with the admin role — both authUserMiddleware and isAdminMiddleware are applied at the router level.

GET /api/v1/admin/verify

Verifies that the currently authenticated user holds the admin role. Returns 200 Success for admins and 401 Unauthorized for all other roles. Use this endpoint to gate admin-only UI sections on the frontend without decoding the JWT client-side.
This route is registered with router.use (not router.get), so it responds to all HTTP methods. The canonical usage is a GET request. Requires authentication and the admin role.
curl -s https://yeti-jobs.onrender.com/api/v1/admin/verify \
  --cookie 'token=ADMIN_JWT_TOKEN'
{
  "message": "Success"
}

GET /api/v1/admin/dashboard

Returns high-level platform statistics covering users, jobs, companies, applications, saved jobs, and verified email records.
Requires authentication and the admin role.
curl -s https://yeti-jobs.onrender.com/api/v1/admin/dashboard \
  --cookie 'token=ADMIN_JWT_TOKEN'
Response fields
message.users_count
string
Total number of registered users.
message.jobs_count
string
Total number of job listings ever posted.
message.companies_count
string
Total number of registered companies.
message.applications_count
string
Total number of job applications submitted.
message.saved_jobs_count
string
Total number of bookmarked jobs across all users.
message.email_verified_count
string
Total number of accounts with a confirmed email address.
{
  "message": {
    "users_count": "1240",
    "jobs_count": "348",
    "companies_count": "42",
    "applications_count": "2871",
    "saved_jobs_count": "965",
    "email_verified_count": "1108"
  }
}

POST /api/v1/admin/assign-user

Assigns an existing user to a company by setting their company_id column. Once assigned, the user gains the company-employee role and can access recruiter-only endpoints. A user who already belongs to a company cannot be reassigned without first clearing their company_id.
Requires authentication and the admin role.
uid
string
required
UUID of the user to assign.
company_id
string
required
UUID of the target company.
curl -s -X POST https://yeti-jobs.onrender.com/api/v1/admin/assign-user \
  --cookie 'token=ADMIN_JWT_TOKEN' \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "company_id": "c1d2e3f4-0000-1111-2222-aabbccddeeff"
  }'
{
  "message": {
    "uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "fname": "Jane",
    "lname": "Doe",
    "email": "jane.doe@example.com",
    "role": "recruiter",
    "company_id": "c1d2e3f4-0000-1111-2222-aabbccddeeff"
  }
}

GET /api/v1/admin/search/users

Searches for users by first name or last name using a case-insensitive ILIKE query. Returns a lightweight result set suitable for the admin user-picker UI.
Requires authentication and the admin role.
q
string
required
Partial first name or last name to search for, e.g. jane.
curl -s "https://yeti-jobs.onrender.com/api/v1/admin/search/users?q=jane" \
  --cookie 'token=ADMIN_JWT_TOKEN'
{
  "message": [
    {
      "fname": "Jane",
      "lname": "Doe",
      "company_id": null,
      "experience": "3",
      "uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    },
    {
      "fname": "Janet",
      "lname": "Rivera",
      "company_id": "c1d2e3f4-0000-1111-2222-aabbccddeeff",
      "experience": "6",
      "uid": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    }
  ]
}

GET /api/v1/admin/search/company

Searches for companies by name using a case-insensitive ILIKE query.
Requires authentication and the admin role.
q
string
required
Partial company name to search for, e.g. acme.
curl -s "https://yeti-jobs.onrender.com/api/v1/admin/search/company?q=acme" \
  --cookie 'token=ADMIN_JWT_TOKEN'
{
  "message": [
    {
      "uid": "c1d2e3f4-0000-1111-2222-aabbccddeeff",
      "name": "Acme Corp"
    },
    {
      "uid": "d2e3f4a5-1111-2222-3333-bbccddeeff00",
      "name": "Acme Digital"
    }
  ]
}

Build docs developers (and LLMs) love