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

# Iniciar sincronización de emails (asíncrono)

> Encola un job de sincronización de emails. Sin parámetro days sincroniza todo el histórico.



## OpenAPI

````yaml /generated/specs/communications.json post /api/v1/omnichannel/email/sync
openapi: 3.0.0
info:
  title: Raul API - Comunicaciones
  description: Inbox, omnichannel, bandejas compartidas, email sync, WhatsApp, spam y tags.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/omnichannel/email/sync:
    post:
      tags:
        - Email Sync
      summary: Iniciar sincronización de emails (asíncrono)
      description: >-
        Encola un job de sincronización de emails. Sin parámetro days sincroniza
        todo el histórico.
      operationId: EmailSyncController_triggerSync
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerSyncDto'
      responses:
        '201':
          description: Job encolado exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerSyncResponseDto'
      security:
        - bearerAuth: []
components:
  schemas:
    TriggerSyncDto:
      type: object
      properties:
        days:
          type: number
          description: Número de días a sincronizar (vacío = todo el histórico)
    TriggerSyncResponseDto:
      type: object
      properties:
        jobId:
          type: string
        message:
          type: string
      required:
        - jobId
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication

````