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

# Get User by Email



## OpenAPI

````yaml /openapi.yaml get /users/by-email
openapi: 3.0.0
info:
  title: Answering Agent API
  description: API for Answering Agent platform
  version: 1.0.0
servers:
  - url: https://answeringagent.com/api/v1
    description: Production API
  - url: https://playground.answeringagent.com/api/v1
    description: Playground API
security: []
paths:
  /users/by-email:
    get:
      tags:
        - Users
      summary: Get User by Email
      operationId: getUserByEmail
      parameters:
        - in: query
          name: email
          required: true
          schema:
            type: string
            format: email
      responses:
        '200':
          description: User object returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: User not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: User not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: integer
          description: Internal user ID
        external_id:
          type: string
          description: External identifier provided by the reseller
        email:
          type: string
          format: email
          description: User's email address
        name:
          type: string
          description: User's display name
        created_at:
          type: string
          format: date-time
          description: When the user was created
        updated_at:
          type: string
          format: date-time
          description: When the user was last updated
        organizations:
          type: array
          description: Organizations this user belongs to with their role
          items:
            type: object
            properties:
              id:
                type: integer
                description: Organization ID
              name:
                type: string
                description: Organization name
              role:
                type: string
                description: User's role in this organization
                enum:
                  - owner
                  - manager
                  - user
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: API key is required
                enum:
                  - API key is required
                  - Invalid credentials
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````