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

Response

200
application/json
Successfully created the sync variant

The response is of type object.