Skip to content

API Users

Saiful Alam Rakib edited this page Apr 22, 2026 · 1 revision

API – Users

User lookup endpoints for finding and viewing registered users. These endpoints are useful when managing team membership.

Base path: /api/v1/users


Endpoints

Method Endpoint Description
GET /users List users
GET /users/{user} Get a single user

GET /users

List registered users. Useful for looking up user IDs before adding them to a team.

Query Parameters:

Parameter Type Description
search string Search by name or email
active_team_id integer Filter by active team
sort_by string Column to sort by
per_page integer Results per page

Response 200:

{
  "data": [
    {
      "id": 1,
      "name": "John Doe",
      "email": "john@example.com",
      "active_team_id": 1
    },
    {
      "id": 2,
      "name": "Jane Doe",
      "email": "jane@example.com",
      "active_team_id": 1
    }
  ],
  "links": { ... },
  "meta": { ... }
}

GET /users/{user}

Get a single user's profile by ID.

Response 200:

{
  "success": true,
  "data": {
    "id": 2,
    "name": "Jane Doe",
    "email": "jane@example.com",
    "active_team_id": 1
  }
}

cURL Examples

TOKEN="YOUR_TOKEN"
BASE="https://bills.msar.me/api/v1"

# Search for a user by name
curl "$BASE/users?search=Jane" \
  -H "Authorization: Bearer $TOKEN" -H "Accept: application/json"

# Get a specific user
curl "$BASE/users/2" \
  -H "Authorization: Bearer $TOKEN" -H "Accept: application/json"

Common Use Case — Adding Team Members

The typical workflow to add someone to a team:

  1. Find the userGET /users?search=jane@example.com
  2. Copy the user ID from the response
  3. Add to teamPOST /teams/{team}/members with { "user_id": 2 }

See API – Teams for full team member management documentation.

Live Link: bills.msar.me

API Docs: API

Open API Collection: API Collection

Clone this wiki locally