# Find Users by Email

Returns the user(s) within the authenticated organization whose email address matches the given value. Use this endpoint to resolve a user record when you have an email address but not the WHITELABEL user ID.

<Note>
**Organization scope and empty results**

Results are always scoped to the calling organization. If the same email exists in another organization it will not appear here. When no user in the organization matches the address, the response contains an empty `data` array rather than an error.
</Note>

**GET** `/organizations/users`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Returns the user(s) whose email matches the given address, scoped to the authenticated organization. An email address may belong to users in multiple organizations; only matches within the calling organization are returned. When no user carries that email the response contains an empty `data` array — it is not an error.

## Authorization

- PUBLIC-API-KEY (apiKey in header)
- PRIVATE-SECRET-KEY (apiKey in header)

## Query parameters

- `email` (string, required)
  Email address to search for. Must be an exact, case-insensitive match.

## Responses

### 200

OK — zero or more users matching the email address.

- `data` (object[])
  List of users whose email matches the requested address within the calling organization. Empty when no match is found.
  - `id` (string<uuid>)
    WHITELABEL-generated unique identifier of the user.
  - `email` (string)
    Email address of the user.
  - `first_name` (string)
    User's first name.
  - `last_name` (string)
    User's last name.
  - `account_permissions` (object[])
    List of account-level permissions assigned to this user.
    - `account_id` (string<uuid>)
      Account the permission applies to.
    - `role_id` (string)
      Role assigned to the user on this account.
  - `account_group_permissions` (object[])
    List of account-group-level permissions assigned to this user.
    - `account_group_id` (string<uuid>)
      Account group the permission applies to.
    - `role_id` (string)
      Role assigned to the user on this account group.
  - `created_at` (string<date-time>)
    ISO 8601 timestamp of when the user was created.
  - `updated_at` (string<date-time>)
    ISO 8601 timestamp of the last update.
- `pagination` (object)
  - `page` (integer)
  - `page_size` (integer)
  - `total_items` (integer)
  - `total_pages` (integer)
  - `has_next` (boolean)
  - `has_previous` (boolean)

Example:

```json
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "account_permissions": [
        {
          "account_id": "00000000-0000-0000-0000-000000000000",
          "role_id": "string"
        }
      ],
      "account_group_permissions": [
        {
          "account_group_id": "00000000-0000-0000-0000-000000000000",
          "role_id": "string"
        }
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "updated_at": "1970-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 0,
    "page_size": 0,
    "total_items": 0,
    "total_pages": 0,
    "has_next": true,
    "has_previous": true
  }
}
```

### 400

Bad Request — `email` query parameter is missing or not a valid email address.

### 401

Unauthorized — invalid or missing API credentials.