> For the complete documentation index, see [llms.txt](https://tbns.gitbook.io/tbns/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tbns.gitbook.io/tbns/references/user-management-api.md).

# User Management API

**Endpoint**: `GET /api/users`

**Description**: Retrieve list of users associated with the partner, including their point balances.

**Get All Users**

```json
curl -X GET "https://api.tbns.io/functions/v1/api/users" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh3a2htcWF2enphaWVvdmtvdHdiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDMwMDA3NDAsImV4cCI6MjA1ODU3Njc0MH0.nKjMLLZ7cY92nchtE2mFtBCOMqb0WWbiqkekaMqVFMU" \
  -H "X-Token: X-TOKEN"
```

**Search by Email**

```
curl -X GET "https://api.tbns.io/functions/v1/api/users?email=test@company.com" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh3a2htcWF2enphaWVvdmtvdHdiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDMwMDA3NDAsImV4cCI6MjA1ODU3Njc0MH0.nKjMLLZ7cY92nchtE2mFtBCOMqb0WWbiqkekaMqVFMU" \
  -H "X-Token: X-TOKEN"
```

**Query Parameters**:

* `email`: Exact email match
* `email_contains`: Partial email match
* `tenant`: Filter by tenant ID

**Response**: Returns users with point balances categorized by status:

* `Open`: Pending points
* `Closed`: Closed transactions
* `Pending`: Points awaiting approval
* `Approved`: Approved points
