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

# Trigger sync(s)

> Triggers an additional, one-off execution of specified sync(s) (for a given connection or all applicable connections if no connection is specified).

<Info>
  Requires an API key with the `environment:syncs:execute` scope. [Learn more about API key scopes](/reference/backend/http-api/api-keys#scopes).
</Info>

## Triggering one-off syncs

This is especially useful if you e.g. changed the metadata for the connection and now want to re-import data.

Use `reset` to clear the checkpoint and re-fetch all data, or `reset` with `emptyCache` to start completely fresh. See the [checkpoints guide](/guides/functions/syncs/checkpoints#re-syncing-resetting-checkpoints-and-the-cache) for details.


## OpenAPI

````yaml POST /sync/trigger
openapi: 3.1.0
info:
  title: Nango API
  description: Nango API specs used to authorize & sync data with external APIs.
  version: 1.0.0
servers:
  - url: https://api.nango.dev
    description: Production server
  - url: http://localhost:3003
    description: Local server
security:
  - bearerAuth: []
externalDocs:
  url: https://nango.dev/docs/reference/backend/http-api/authentication
paths:
  /sync/trigger:
    post:
      summary: Trigger a sync
      description: >-
        Triggers an additional, one-off execution of specified sync(s) (for a
        given connection or all applicable connections if no connection is
        specified).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - provider_config_key
                - syncs
              properties:
                provider_config_key:
                  type: string
                  description: The ID of the integration that you established within Nango.
                connection_id:
                  type: string
                  description: >-
                    The ID of the connection. If omitted, the syncs will be
                    triggered for all relevant connections.
                syncs:
                  oneOf:
                    - type: array
                      description: >-
                        A list of sync names that you wish to pause. If empty,
                        all syncs are triggered
                      items:
                        type: string
                        description: Sync name
                        example: github-issues
                    - type: array
                      description: >-
                        A list of sync object (with a name and variant
                        properties) that you wish to trigger. If empty, all
                        syncs are triggered
                      items:
                        type: object
                        required:
                          - name
                        properties:
                          name:
                            type: string
                            description: The name of the sync
                          variant:
                            type: string
                            description: The variant name
                        example:
                          name: github-issues
                          variant: custom-variant
                opts:
                  type: object
                  description: Options for triggering the sync.
                  properties:
                    reset:
                      type: boolean
                      description: >-
                        If true, clears the checkpoint and lastSyncDate before
                        triggering the sync, causing it to start fresh.
                    emptyCache:
                      type: boolean
                      description: >-
                        If true, deletes all cached records associated with the
                        sync before triggering. Must be used with reset=true.
      responses:
        '200':
          description: Successfully triggered the sync
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: The secret key from your Nango environment.

````