POST
/
sync
/
{name}
/
variant
/
{variant}
curl --request POST \
  --url https://api.nango.dev/sync/{name}/variant/{variant} \
  --header 'Content-Type: application/json' \
  --data '{
  "provider_config_key": "<string>",
  "connection_id": "<string>"
}'
{
  "id": "<string>",
  "name": "<string>",
  "variant": "<string>"
}

Creating a sync variant

Sync variants allow you to create different configurations of the same sync for a specific connection. This is useful when you need to sync the same data with different settings or filters.

Key features

  • Each variant operates independently with its own sync schedule
  • Variants can be queried separately through the records endpoint using the variant query parameter
  • Cannot use “base” as a variant name (protected)

After creating a variant, you can use the /records endpoint to access its data by specifying the variant query parameter:

GET /records?model=MyModel&variant=MyVariant

Path Parameters

name
string
required

The name of the sync

variant
string
required

The name of the variant to create. Cannot be "base" (protected name).

Body

application/json
provider_config_key
string
required

The integration ID used when creating the connection

connection_id
string
required

The ID of the connection to create the sync variant for

Response

200
application/json
Successfully created the sync variant
id
string
required

The unique identifier for the created sync variant

name
string
required

The name of the sync

variant
string
required

The name of the variant