> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Look Up Test Users

> Looks up members of your sandbox merchant by email, phone or user id, with their points balance, tier and tags.

> [!NOTE]
>
> Please review proper request headers [here](https://docs.thanx.com/consumer/usage/headers.md).

<Snippet file="sandbox/auth.mdx" />

Only active members of your sandbox merchant are returned: disabled users and disabled memberships are left out. Use this endpoint to find a test user's `id`, and to check their points balance, tier and tags after a test step.

> [!TIP]
>
> Always pass `email`, `phone` or `user_id` for a lookup. Listing every member is slow on merchants with many users; if you do page through all members, keep `per_page` moderate.

### Parameters

Pass at most one of `email`, `phone` and `user_id`. With none of them, the endpoint lists all members of your merchant.

**email** `string`

Exact email match (case-insensitive)

**phone** `string`

Matches the phone stored for the user. The value is normalized to [E.164 format](https://www.twilio.com/docs/glossary/what-e164) before the match, and phones are stored in E.164 too. Send E.164 (for example `+14157582345`) so the number is parsed with the right country code.

**user\_id** `string`

The user's `id`

<Snippet file="pagination/params.mdx" />

### Response

**users** `array`

**user**

**id** `string`

The user ID

**email** `string`

The user's email

**phone** `string`

The user's phone number

**first\_name** `string`

The user's first name

**last\_name** `string`

The user's last name

**birth\_date** `hash`

The user's birth date (`year`, `month`, `day`), if provided

**zip\_code** `string`

The user's zip code

**updated\_at** `string`

When the user's membership at your merchant was last updated, in ISO8601 format

**loyalty** `hash`

**loyalty**

**tier** `string`

The user's tier at your merchant. `null` if the merchant has no tiers.

**points\_balance** `decimal`

The user's points balance at your merchant. `null` if the merchant has no points experience.

**user\_joined\_at** `string`

When the user joined your merchant, in ISO8601 format

**tags** `array`

The tags of the returned users at your merchant

**tag**

**id** `string`

The tag ID

**key** `string`

The tag key

**values** `array(string)`

The tag values

**user\_id** `string`

The user the tag belongs to

**merchant\_id** `string`

The merchant ID

<Snippet file="pagination/response.mdx" />

### Errors

| Status | Code | When |
| - | - | - |
| `400` | `BAD_REQUEST` | More than one of `email`, `phone` and `user_id` was sent |
| `400` | `CLIENT_ID_HEADER_INVALID` | The `X-ClientId` header is missing or doesn't match an app |
| `401` | `AUTHENTICATION_GENERIC` | An `Authorization` header was sent with an invalid token |
| `403` | `FORBIDDEN` | Called in production, or your `X-ClientId` isn't tied to exactly one merchant |

> [!TIP]
>
> No match returns `200` with an empty `users` array, not a `404`.

```bash Look Up Test Users theme={null}
curl "https://api.thanxsandbox.com/users?email=jane.smith@example.com" \
  -X GET \
  -H "Accept-Version: v4.0" \
  -H "Accept: application/json" \
  -H "X-ClientId: ${client_id}"
```

```json theme={null}
{
  "pagination": {
    "current_page": 1,
    "per_page": 10,
    "total_pages": 1
  },
  "users": [
    {
      "id": "fhwer123",
      "email": "jane.smith@example.com",
      "phone": "+14158672345",
      "first_name": "Jane",
      "last_name": "Smith",
      "birth_date": {
        "month": 8,
        "day": 14
      },
      "gender": "unknown",
      "zip_code": "12345",
      "updated_at": "2026-11-17T15:04:05Z",
      "loyalty": {
        "tier": "bronze",
        "points_balance": 120.0,
        "user_joined_at": "2026-11-17T15:00:00Z"
      }
    }
  ],
  "tags": [
    {
      "id": "wjtou290hyrw",
      "key": "allergens",
      "values": ["gluten", "soy"],
      "user_id": "fhwer123",
      "merchant_id": "ghwou3457f"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.