BackendHTTP APISyncs

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 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
POST
/sync/{name}/variant/{variant}

Creates a new sync variant for a specific connection

Authorization

bearerAuth
headerAuthorizationBearer <token>

An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.

Path Parameters

name*string

The name of the sync

variant*string

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

Request Body

application/json
  1. body
provider_config_key*string

The integration ID used when creating the connection

connection_id*string

The ID of the connection to create the sync variant for

Response Body

Successfully created the sync variant

application/json
  1. response
id*string

The unique identifier for the created sync variant

name*string

The name of the sync

variant*string

The name of the variant

Example Request
curl -X POST 'https://api.tenklo.dev/sync/string/variant/string' \  -H 'Content-Type: application/json' \  -d '{  "provider_config_key": "string",  "connection_id": "string"}'
Example Response
{  "id": "string",  "name": "string",  "variant": "string"}

On this page