> ## 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.

# Get email sync status for an account

> Returns the latest historical-sync progress for a connected mailbox: whether a sync is in flight, last completion timestamp, and progress counters. Use this to drive a progress indicator after kicking off `POST /api/email/messages/sync`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/email/messages/sync/status
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/messages/sync/status:
    get:
      tags:
        - Email
      summary: Get email sync status for an account
      description: >-
        Returns the latest historical-sync progress for a connected mailbox:
        whether a sync is in flight, last completion timestamp, and progress
        counters. Use this to drive a progress indicator after kicking off `POST
        /api/email/messages/sync`.
      operationId: get_email_messages_sync_status
      parameters:
        - in: query
          name: accountId
          required: true
          schema:
            type: string
          description: Internal `_id` of the `EmailAccount` to query.
      responses:
        '200':
          description: Sync status returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailSyncStatusResponse'
        '400':
          description: accountId is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    EmailSyncStatusResponse:
      type: object
      description: Response from `GET /api/email/messages/sync/status`.
      properties:
        accountId:
          type: string
          description: The account this status belongs to.
        inProgress:
          type: boolean
          description: True while a historical sync is currently running.
        lastSyncedAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            Timestamp of the most recent successful sync, or `null` if none has
            completed.
        messagesProcessed:
          type: integer
          description: Cumulative count of messages persisted by the latest sync run.
        totalEstimated:
          type: integer
          nullable: true
          description: >-
            Best-effort estimate of total messages the sync will touch, or
            `null` when the provider does not expose a count.
        error:
          type: string
          nullable: true
          description: Last error message if the most recent run failed; otherwise omitted.
      additionalProperties: true
      example:
        accountId: 665f1a0c0e0a4b001a2c9f50
        inProgress: false
        lastSyncedAt: '2026-05-18T12:00:00.000Z'
        messagesProcessed: 423
        totalEstimated: 423
        error: null
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````