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

# Find a user by email

> Looks up a single user by email within the caller's organization.

A service token may look up any email in your organization; a **user token** may only resolve its own, returning the same 404 either way (enumeration-safe).

**Permissions:** `users:read`

Resolves an email to a `user_id`


## OpenAPI

````yaml get /iam/users/find
openapi: 3.1.0
info:
  title: OpenLoop API
  version: 0.1.0
  description: >-
    Unified reference for the OpenLoop Patient (clinical) and Payments & Revenue
    APIs.
servers:
  - url: https://api.openloophealth.com/v0.1
    description: Production partner edge
  - url: https://api-staging.openloophealth.com/v0.1
    description: Staging partner edge (sandbox credentials)
security: []
paths:
  /iam/users/find:
    get:
      tags:
        - Users
      summary: Find a user by email
      description: >-
        Looks up a single user by email within the caller's organization.


        A service token may look up any email in your organization; a **user
        token** may only resolve its own, returning the same 404 either way
        (enumeration-safe).


        **Permissions:** `users:read`
      parameters:
        - name: email
          in: query
          required: true
          schema:
            type: string
            format: email
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/User'
                  request_id:
                    type: string
                required:
                  - data
                  - request_id
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Bearer token is missing the users:read permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            No user found for that email in your organization, or (for a user
            token) the email is not the caller's own
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - serviceToken:
            - users:read
        - userToken:
            - users:read
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
        vendor_id:
          type: string
          description: >-
            Cross-reference to the identity vendor's user id (e.g. the Auth0
            user id).
        email:
          type: string
          format: email
        phone:
          type: string
        phone_country_code:
          type: string
        phone_e164:
          type: string
        email_verified:
          type: boolean
        phone_verified:
          type: boolean
        first_name:
          type: string
        middle_name:
          type: string
        last_name:
          type: string
        status:
          type: string
          enum:
            - pending_verification
            - active
            - inactive
            - deleted
        created_at:
          type: string
        updated_at:
          type: string
        created_by:
          type: string
        updated_by:
          type: string
      required:
        - id
        - email
        - email_verified
        - phone_verified
        - first_name
        - last_name
        - status
        - created_at
        - updated_at
        - created_by
        - updated_by
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            error_code:
              type: string
          required:
            - message
            - error_code
        request_id:
          type: string
      required:
        - error
        - request_id
  securitySchemes:
    serviceToken:
      type: oauth2
      description: >-
        Service (M2M) access token issued by POST /auth/token using the
        client_credentials grant. Required scopes, where known, are listed on
        each operation below.
      flows:
        clientCredentials:
          tokenUrl: https://api.openloophealth.com/v0.1/auth/token
          scopes: {}
    userToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User access token issued by POST /auth/token via the verification-code
        grant (after Verify a one-time code) or the refresh_token grant.

````

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