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

# Get Email by ID

> Retrieve a specific email by its UUID or email address with optional relationship details



## OpenAPI

````yaml GET /v1/emails/{id}
openapi: 3.1.0
info:
  title: Well Document API
  version: 1.0.0
  description: API for uploading and managing financial documents in the Well platform
servers:
  - url: https://api.wellapp.ai
security: []
paths:
  /v1/emails/{id}:
    get:
      summary: Get email by ID
      description: >-
        Retrieve a specific email by its UUID or email address with optional
        relationship details
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - name: id
          in: path
          required: true
          schema:
            oneOf:
              - type: string
                format: uuid
                description: UUID of the email to retrieve
              - type: string
                format: email
                description: Email address to retrieve
          description: UUID or email address of the email to retrieve
          examples:
            uuid:
              value: 550e8400-e29b-41d4-a716-446655440000
            email:
              value: user@example.com
      responses:
        '200':
          description: Email retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailResponse'
              example:
                data:
                  type: email
                  id: email1-uuid
                  attributes:
                    value: sarah.wilson@techcorp.com
                    is_primary: true
                    is_verified: true
                    label: work
                    created_at: '2023-06-15T10:30:00Z'
                    updated_at: '2023-06-15T10:30:00Z'
                  relationships:
                    persons:
                      data:
                        - type: people
                          id: person1-uuid
                    companies:
                      data:
                        - type: company
                          id: company1-uuid
                    workspaces:
                      data:
                        - type: workspace
                          id: workspace1-uuid
                included:
                  - type: people
                    id: person1-uuid
                    attributes:
                      first_name: Sarah
                      last_name: Wilson
                      full_name: Sarah Wilson
                      created_at: '2023-06-15T09:00:00Z'
                      updated_at: '2023-06-15T09:00:00Z'
                  - type: company
                    id: company1-uuid
                    attributes:
                      name: TechCorp Solutions
                      description: Leading technology company
                      domain_name_primary_link_url: techcorp.com
                      locale: en
                      created_at: '2023-06-01T08:00:00Z'
                      updated_at: '2023-06-01T08:00:00Z'
                  - type: workspace
                    id: workspace1-uuid
                    attributes:
                      name: Sales Team
                      description: Sales team workspace
                      avatar_color: '#FF5733'
                      auto_extract_enabled: true
                      created_at: '2023-06-01T08:00:00Z'
                      updated_at: '2023-06-01T08:00:00Z'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: Not found - related entity does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - id: holder_not_found
                    status: '404'
                    code: HOLDER_NOT_FOUND
                    title: Holder Not Found
                    detail: The specified holder company or person does not exist
                    source:
                      pointer: /data/relationships/holder/data/id
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      description: Bearer token for authentication
  schemas:
    EmailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Email'
    UnauthorizedError:
      type: object
      properties:
        code:
          type: string
          example: UNAUTHORIZED
          description: Error code identifier
        status:
          type: integer
          example: 401
          description: HTTP status code
        title:
          type: string
          example: Unauthorized
          description: Error title
        message:
          type: string
          example: You are not authorized to access this resource
          description: Detailed error message
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              code:
                type: string
              title:
                type: string
              detail:
                type: string
            required:
              - status
              - code
              - title
              - detail
    Email:
      type: object
      properties:
        type:
          type: string
          const: email
        id:
          type: string
          format: uuid
        attributes:
          $ref: '#/components/schemas/EmailAttributes'
        relationships:
          $ref: '#/components/schemas/AtomicRelationshipsResponse'
        included:
          $ref: '#/components/schemas/SimpleIncludedResponse'
    EmailAttributes:
      type: object
      properties:
        value:
          type: string
          format: email
          description: Email address value
          example: sarah.wilson@techcorp.com
        is_primary:
          type: boolean
          default: true
          description: >-
            Whether this is the primary email address. Defaults to 'false',
            unless no other email is marked as primary (in which case it becomes
            'true'). Only one email can be marked as primary per person/company.
          example: true
        label:
          type: string
          enum:
            - work
            - personal
            - other
            - ...
          description: >-
            Email label type. See [all available labels](/enums/label) for
            complete list.
          default: work
          example: work
        created_at:
          type: string
          format: date-time
          description: Timestamp when the email was created
          example: '2023-06-15T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the email was last updated
          example: '2023-06-15T10:30:00Z'
    AtomicRelationshipsResponse:
      type: object
      properties:
        persons:
          $ref: '#/components/schemas/PeopleRelationResponse'
        companies:
          $ref: '#/components/schemas/CompanyRelationResponse'
        workspaces:
          $ref: '#/components/schemas/WorkspaceRelationResponse'
    SimpleIncludedResponse:
      type: object
      properties:
        persons:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: people
                  id:
                    type: string
                    format: uuid
                  attributes:
                    $ref: '#/components/schemas/PersonAttributes'
        companies:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: company
                  id:
                    type: string
                    format: uuid
                  attributes:
                    $ref: '#/components/schemas/CompanyAttributes'
        workspaces:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    format: uuid
                  attributes:
                    $ref: '#/components/schemas/WorkspaceAttributes'
    PeopleRelationResponse:
      type: object
      properties:
        data:
          type: array
          items:
            properties:
              type:
                type: string
                enum:
                  - people
              id:
                type: string
                format: uuid
                description: UUID of the people
    CompanyRelationResponse:
      type: object
      properties:
        data:
          type: array
          items:
            properties:
              type:
                type: string
                enum:
                  - company
              id:
                type: string
                format: uuid
                description: UUID of the company
    WorkspaceRelationResponse:
      type: object
      properties:
        data:
          type: array
          items:
            oneOf:
              - properties:
                  type:
                    type: string
                    enum:
                      - workspace
                  external_workspace_id:
                    type: string
                    description: External workspace identifier
              - properties:
                  type:
                    type: string
                    enum:
                      - workspace
                  id:
                    type: string
                    format: uuid
                    description: UUID of the workspace
    PersonAttributes:
      type: object
      description: Person attribute data
      properties:
        first_name:
          type: string
          description: Person's first name
          example: Marie
          minLength: 1
          maxLength: 100
        last_name:
          type: string
          description: Person's last name
          example: Dubois
          minLength: 1
          maxLength: 100
        full_name:
          type: string
          description: Auto-computed full name (first + last)
          example: Marie Dubois
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: Person creation timestamp (UTC)
          example: '2024-01-15T10:30:00Z'
          readOnly: true
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Last modification timestamp (UTC)
          example: '2024-01-16T14:20:00Z'
          readOnly: true
      required:
        - first_name
        - last_name
        - created_at
    CompanyAttributes:
      type: object
      properties:
        description:
          type: string
        domain_name_primary_link_url:
          type: string
          format: url
          maxLength: 500
          description: >-
            The domain url from the website or email address of the company.
            Used as unique identifier in some cases.
          examples:
            - acme.com
        tax_id:
          type: object
          properties:
            value:
              description: Tax ID issued by local or national tax authority.
              type: string
              examples:
                - DE123456789
            type:
              description: >-
                Type of tax ID, useful for applying formatting and validation
                rules.
              type: string
              examples:
                - VAT
        registration:
          type: object
          properties:
            trade_name:
              description: Commercial or branding name (if different from registered name).
              type: string
              examples:
                - TechSol
            registered_name:
              description: Legal company name.
              type: string
              minLength: 1
              maxLength: 100
              examples:
                - Red Hat Inc.
        registration_number:
          type: object
          properties:
            business_type:
              description: Legal entity structure type.
              type: string
              examples:
                - GmbH
            value:
              description: Official company registration number.
              type: string
              examples:
                - HRB 123456
            registry_name:
              description: Name of the official registration body.
              type: string
              examples:
                - Handelsregister Berlin
            registry_country:
              description: Country of the registry authority. (string (ISO 3166-1 alpha-2))
              type: string
              examples:
                - DE
        workspace_id:
          type: string
          format: uuid
          description: UUID of the workspace associated with this company
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WorkspaceAttributes:
      type: object
      properties:
        name:
          type: string
          description: Workspace name
        desription:
          type: string
          description: Workspace description
        external_workspace_id:
          type: string
          format: uuid
          description: external workspace id
        avatar_color:
          type: string
          format: colors
          description: Color of the avatar
        created_at:
          type: string
          format: date-time
          description: Timestamp when the workspace was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the workspace was last updated

````