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

# List Syncs

> List all the syncs in the current workspace



## OpenAPI

````yaml https://api.hightouch.io/api/swagger.json get /syncs
openapi: 3.0.0
info:
  title: Hightouch API
  version: 1.0.0
  description: Hightouch Public Rest API to access syncs, models, sources and destinations
  contact:
    name: Hightouch
    url: https://hightouch.com
servers:
  - url: https://api.hightouch.com/api/v1
security: []
paths:
  /syncs:
    get:
      summary: List Syncs
      description: List all the syncs in the current workspace
      operationId: ListSync
      parameters:
        - description: filter based on slug
          in: query
          name: slug
          required: false
          schema:
            type: string
        - description: filter based on modelId
          in: query
          name: modelId
          required: false
          schema:
            type: number
            format: double
        - description: filter based on destinationId
          in: query
          name: destinationId
          required: false
          schema:
            type: number
            format: double
        - description: select syncs that were run after given ISO timestamp
          in: query
          name: after
          required: false
          schema:
            type: string
            format: date-time
        - description: select syncs that were run before given ISO timestamp
          in: query
          name: before
          required: false
          schema:
            type: string
            format: date-time
        - description: set the offset on results (for pagination)
          in: query
          name: offset
          required: false
          schema:
            default: 0
            format: double
            type: number
        - description: limit the number of objects returned (default is 100)
          in: query
          name: limit
          required: false
          schema:
            default: 100
            format: double
            type: number
        - description: specify the order
          in: query
          name: orderBy
          required: false
          schema:
            default: id
            type: string
            enum:
              - id
              - name
              - slug
              - createdAt
              - updatedAt
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  hasMore:
                    type: boolean
                  data:
                    items:
                      $ref: '#/components/schemas/Sync'
                    type: array
                required:
                  - hasMore
                  - data
                type: object
              examples:
                Example 1:
                  value:
                    hasMore: false
                    data:
                      - id: 1
                        slug: testsync
                        workspaceId: 1
                        createdAt: '2022-02-16T21:37:58.510Z'
                        updatedAt: '2022-02-16T21:37:58.510Z'
                        createdBy:
                          id: 1
                          name: Jane Doe
                          email: jane.doe@example.com
                        updatedBy:
                          id: 1
                          name: Jane Doe
                          email: jane.doe@example.com
                        destinationId: 1
                        modelId: 1
                        configuration:
                          mode: upsert
                          object: contacts
                          mappings:
                            - to: email
                              from: email
                              type: standard
                            - to: phone
                              from: phone
                              type: standard
                          objectId: 0-1
                          externalIdMapping:
                            to: firstname
                            from: test_id
                            type: standard
                          associationMappings: []
                        schedule:
                          type: interval
                          schedule:
                            interval:
                              unit: day
                              quantity: 1
                        status: success
                        disabled: false
                        lastRunAt: '2022-02-16T21:37:58.510Z'
                        referencedColumns:
                          - email
                          - name
                        primaryKey: id
                        externalSegment: {}
                        tags:
                          foo: bar
                        syncTemplateId: null
                        syncTemplateOverrides: null
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '422':
          description: Validation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
      security:
        - bearerAuth: []
components:
  schemas:
    Sync:
      description: >-
        Syncs define how data from models are mapped to destinations. Each time
        a

        sync runs, Hightouch calculates the rows that have changed since the
        last

        run, and syncs them to Sync's destination.
      properties:
        id:
          type: number
          format: double
          description: The sync's id
        slug:
          type: string
          description: The sync's slug
        workspaceId:
          type: number
          format: double
          description: The id of the workspace that the sync belongs to
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the sync was created
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the sync was last updated
        createdBy:
          allOf:
            - $ref: '#/components/schemas/UserReference'
          nullable: true
          description: The user who created the sync, or null if no user was recorded
        updatedBy:
          allOf:
            - $ref: '#/components/schemas/UserReference'
          nullable: true
          description: The user who last updated the sync, or null if no user was recorded
        destinationId:
          type: number
          format: double
          description: The id of the Destination that sync is connected to
        modelId:
          type: number
          format: double
          description: The id of the Model that sync is connected to
        configuration:
          properties: {}
          additionalProperties: {}
          type: object
          description: >-
            The sync's configuration. This specifies how data is mapped, among
            other

            configuration.


            The schema depends on the destination type.


            For a sync bound to a sync template this is the effective
            configuration:

            the template's configuration with this sync's
            `syncTemplateOverrides`

            applied.


            Consumers should NOT make assumptions on the contents of the

            configuration. It may change as Hightouch updates its internal code.
        schedule:
          properties:
            schedule:
              anyOf:
                - $ref: '#/components/schemas/IntervalSchedule'
                - $ref: '#/components/schemas/CronSchedule'
                - $ref: '#/components/schemas/VisualCronSchedule'
                - $ref: '#/components/schemas/DBTSchedule'
            type:
              type: string
          required:
            - type
          type: object
          nullable: true
          description: >-
            The scheduling configuration. It can be triggered based on several
            ways:


            Interval: the sync will be triggered based on certain
            interval(minutes/hours/days/weeks)


            Cron: the sync will be triggered based on cron expression
            https://en.wikipedia.org/wiki/Cron.


            Visual: the sync will be triggered based a visual cron configuration
            on UI


            DBT-cloud: the sync will be triggered based on a dbt cloud job


            Match Booster (type "match_booster"): the sync will be triggered
            after each

            Match Booster enrichment run of its model completes. Requires the
            model to

            have Match Booster enabled, and takes no inner schedule payload.
        status:
          $ref: '#/components/schemas/SyncStatus'
          description: The overall status of the sync
        disabled:
          type: boolean
          description: Whether the sync has been disabled by the user.
        lastRunAt:
          type: string
          format: date-time
          nullable: true
          description: The timestamp of the last sync run
        referencedColumns:
          items:
            type: string
          type: array
          description: The reference column that sync depends on to sync data from source
        primaryKey:
          type: string
          description: The primary key that sync uses to identify data from source
        externalSegment:
          properties:
            id:
              type: string
          type: object
          description: >-
            The user facing ID for any created lists or audiences in the sync
            destination
        tags:
          properties: {}
          additionalProperties:
            type: string
          type: object
          description: The tags of the sync
        syncTemplateId:
          type: number
          format: double
          nullable: true
          description: >-
            The id of the sync template this sync is bound to, or null when the
            sync

            owns its configuration. A bound sync takes its destination and

            configuration from the template and follows later changes to the

            template; `configuration` is the effective merged configuration and

            `syncTemplateOverrides` holds this sync's own values.
        syncTemplateOverrides:
          properties: {}
          additionalProperties: {}
          type: object
          nullable: true
          description: >-
            The template configuration fields this sync overrides, keyed by

            configuration field path (for example "externalIdMapping" or

            "target.schema"). Null when the sync is not bound to a sync template
            or

            has no overrides.
      required:
        - id
        - slug
        - workspaceId
        - createdAt
        - updatedAt
        - createdBy
        - updatedBy
        - destinationId
        - modelId
        - configuration
        - schedule
        - status
        - disabled
        - lastRunAt
        - referencedColumns
        - primaryKey
        - externalSegment
        - tags
        - syncTemplateId
        - syncTemplateOverrides
      type: object
      additionalProperties: false
    ValidateErrorJSON:
      properties:
        message:
          type: string
          enum:
            - Validation failed
          nullable: false
        details:
          properties: {}
          additionalProperties: {}
          type: object
      required:
        - message
        - details
      type: object
      additionalProperties: false
    UserReference:
      description: >-
        The Hightouch user who created or last updated a resource. Changes made
        with

        an API key are attributed to the user who created the key.
      properties:
        id:
          type: number
          format: double
          description: The user's id
        name:
          type: string
          description: The user's name
        email:
          type: string
          description: The user's email address
      required:
        - id
        - name
        - email
      type: object
      additionalProperties: false
    IntervalSchedule:
      properties:
        interval:
          $ref: '#/components/schemas/Interval'
      required:
        - interval
      type: object
      additionalProperties: false
    CronSchedule:
      properties:
        expression:
          type: string
      required:
        - expression
      type: object
      additionalProperties: false
    VisualCronSchedule:
      properties:
        expressions:
          items:
            properties:
              days:
                $ref: '#/components/schemas/Record_Day.boolean-or-undefined_'
              time:
                type: string
            required:
              - days
              - time
            type: object
          type: array
      required:
        - expressions
      type: object
      additionalProperties: false
    DBTSchedule:
      properties:
        account:
          properties:
            id:
              type: string
          required:
            - id
          type: object
        job:
          properties:
            id:
              type: string
          required:
            - id
          type: object
      required:
        - account
        - job
      type: object
      additionalProperties: false
    SyncStatus:
      description: SyncStatus
      enum:
        - disabled
        - pending
        - cancelled
        - failed
        - queued
        - success
        - warning
        - querying
        - processing
        - reporting
        - interrupted
      type: string
    Interval:
      properties:
        unit:
          $ref: '#/components/schemas/IntervalUnit'
        quantity:
          type: number
          format: double
      required:
        - unit
        - quantity
      type: object
      additionalProperties: false
    Record_Day.boolean-or-undefined_:
      properties:
        monday:
          type: boolean
        tuesday:
          type: boolean
        wednesday:
          type: boolean
        thursday:
          type: boolean
        friday:
          type: boolean
        saturday:
          type: boolean
        sunday:
          type: boolean
      type: object
      description: Construct a type with a set of properties K of type T
    IntervalUnit:
      enum:
        - minute
        - hour
        - day
        - week
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````