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

# Listar historial de sincronización

> Devuelve el historial paginado de eventos de sincronización con HubSpot



## OpenAPI

````yaml /es/openapi.json get /v1/hubspot/sync-logs
openapi: 3.0.0
info:
  title: Nuvia API - Empresa
  description: Documentación de la API para empresas
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: messages
    x-group: Mensagens
  - name: contacts
    x-group: Contatos
  - name: campaigns
    x-group: Campanhas
  - name: tables
    x-group: Tabelas e Listas
  - name: agents
    x-group: Agentes
  - name: conversations
    x-group: Conversas
  - name: inboxes
    x-group: Caixas de Entrada
  - name: knowledge
    x-group: Base de Conhecimento
  - name: Webhooks
    x-group: Webhooks
  - name: campaign-enrollments
    x-group: Inscrições em Campanha
  - name: custom-fields
    x-group: Campos Customizados
  - name: resources
    x-group: Arquivos e Anexos
  - name: hubspot
    x-group: HubSpot
paths:
  /v1/hubspot/sync-logs:
    get:
      tags:
        - hubspot
      summary: Listar historial de sincronización
      description: Devuelve el historial paginado de eventos de sincronización con HubSpot
      operationId: HubSpotController_listSyncLogs
      parameters:
        - name: page
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 9007199254740991
            default: 1
            type: string
        - name: rowsPerPage
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 100
            default: 10
            type: string
        - name: event_type
          required: false
          in: query
          schema:
            type: string
        - name: direction
          required: false
          in: query
          schema:
            type: string
            enum:
              - APP_TO_HUBSPOT
              - HUBSPOT_TO_APP
        - name: status
          required: false
          in: query
          schema:
            type: string
            enum:
              - SUCCESS
              - FAILED
              - PARTIAL
        - name: object_type
          required: false
          in: query
          schema:
            type: string
            enum:
              - CONTACT
              - DEAL
              - LEAD
        - name: search
          required: false
          in: query
          schema:
            type: string
        - name: from
          required: false
          in: query
          schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        - name: to
          required: false
          in: query
          schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      responses:
        '200':
          description: Historial devuelto correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSyncLogsResponseDto'
        '401':
          description: Token inválido o expirado
        '403':
          description: Sin permiso para acceder a este recurso
      security:
        - JWT-auth: []
components:
  schemas:
    ListSyncLogsResponseDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SyncLogItemDto'
        pagination:
          $ref: '#/components/schemas/SyncLogPaginationDto'
      required:
        - items
        - pagination
    SyncLogItemDto:
      type: object
      properties:
        _id:
          type: string
        event_type:
          type: string
        direction:
          type: string
        status:
          type: string
        object_type:
          type: string
        summary:
          type: string
        internal_id:
          type: string
        external_id:
          type: string
        contact_id:
          type: string
        conversation_id:
          type: string
        hubspot_contact_id:
          type: string
        hubspot_deal_id:
          type: string
        hubspot_lead_id:
          type: string
        contact_name:
          type: string
        contact_phone:
          type: string
        deal_name:
          type: string
        details:
          type: object
        mapped_fields:
          type: array
          items:
            $ref: '#/components/schemas/MappedFieldDto'
        received_fields:
          type: object
          description: >-
            Propiedades tal como llegaron de HubSpot en este evento, agrupadas
            por objectType (solo en el inbound). Se omite en el listado.
          example:
            deals:
              dealname: Proposta X
              dealstage: '2523226'
            contacts:
              email: contato@exemplo.com
              lifecyclestage: '1047864462'
        local_snapshot:
          type: object
          description: >-
            Estado de Nuvia en el instante del envío al CRM (solo en el
            outbound). Se omite en el listado.
          example:
            status: OPEN
            lead_score: 70
            resume: Resumo da conversa
        error:
          type: string
        duration_ms:
          type: number
        attempt:
          type: number
        createdAt:
          type: string
      required:
        - _id
        - event_type
        - direction
        - status
        - object_type
        - summary
        - createdAt
    SyncLogPaginationDto:
      type: object
      properties:
        total_count:
          type: number
        page:
          type: number
        rowsPerPage:
          type: number
      required:
        - total_count
        - page
        - rowsPerPage
    MappedFieldDto:
      type: object
      properties:
        nuvia_field:
          type: string
          example: conversation.status
        hubspot_property:
          type: string
          example: contacts.nuvia_status
        value:
          type: object
      required:
        - nuvia_field
        - hubspot_property
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT de autenticación

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.