Create sync variant
Requires an API key with the environment:syncs:variant:create scope. Learn more about API key scopes.
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
variantquery 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=MyVariantCreates a new sync variant for a specific connection
bearerAuthAuthorizationBearer <token>An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.
name*stringThe name of the sync
variant*stringThe name of the variant to create. Cannot be "base" (protected name).
application/json- body
provider_config_key*stringThe integration ID used when creating the connection
connection_id*stringThe ID of the connection to create the sync variant for
Successfully created the sync variant
application/json- response
id*stringThe unique identifier for the created sync variant
name*stringThe name of the sync
variant*stringThe name of the variant
curl -X POST 'https://api.tenklo.dev/sync/string/variant/string' \ -H 'Content-Type: application/json' \ -d '{ "provider_config_key": "string", "connection_id": "string"}'{ "id": "string", "name": "string", "variant": "string"}