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

# List email accounts for the current user

> Returns all active `EmailAccount` documents the authenticated user has connected (across Gmail and Outlook), sorted newest-first. The OAuth `tokens` subdocument is stripped from each entry.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/email/accounts
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/email/accounts:
    get:
      tags:
        - Email
      summary: List email accounts for the current user
      description: >-
        Returns all active `EmailAccount` documents the authenticated user has
        connected (across Gmail and Outlook), sorted newest-first. The OAuth
        `tokens` subdocument is stripped from each entry.
      operationId: get_email_accounts
      responses:
        '200':
          description: Email accounts list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailAccountListResponse'
        '500':
          description: Unable to list email accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    EmailAccountListResponse:
      type: object
      description: Response from `GET /api/email/accounts`.
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/EmailAccountDto'
          description: Active connected mailboxes for the authenticated user, newest-first.
      required:
        - accounts
      additionalProperties: true
      example:
        accounts:
          - _id: 665f1a0c0e0a4b001a2c9f50
            provider: gmail
            emailAddress: ops@acme.example
            isActive: true
    EmailErrorResponse:
      type: object
      description: >-
        Error envelope returned by Email feature endpoints. Most paths only set
        `error`; a few include `code` for diagnostic context (e.g. provider
        mismatches).
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: string
      required:
        - error
      additionalProperties: true
      example:
        error: Email account not found
    EmailAccountDto:
      type: object
      description: >-
        A connected mailbox. Returned by `GET /api/email/accounts`. OAuth
        `tokens` are intentionally stripped from this projection.
      properties:
        _id:
          type: string
          description: Internal `EmailAccount` id.
        userId:
          type: string
        organizationId:
          type: string
        provider:
          type: string
          enum:
            - gmail
            - outlook
          description: Email provider this account is connected through.
        providerAccountId:
          type: string
          description: >-
            Stable provider-side identifier for this mailbox (Google sub /
            Microsoft id).
        emailAddress:
          type: string
          format: email
          description: Normalised (lowercase) mailbox address.
        isActive:
          type: boolean
          description: '`true` while the account participates in sync.'
        historyId:
          type: string
          description: >-
            Gmail history cursor or Outlook subscription id used for incremental
            sync / push-notification wiring.
        watchExpiration:
          type: string
          format: date-time
          description: When the mailbox watch / subscription expires and must be renewed.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
      example:
        _id: 665f1a0c0e0a4b001a2c9f50
        userId: 64ee9a8b1e7f2a0011223399
        organizationId: 64ee9a8b1e7f2a0011223344
        provider: gmail
        providerAccountId: '107834928382923743821'
        emailAddress: ops@acme.example
        isActive: true
        historyId: '123456'
        watchExpiration: '2026-05-25T00:00:00.000Z'
        createdAt: '2026-05-01T09:00:00.000Z'
        updatedAt: '2026-05-18T12:00:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````