Official C# SDK for the ThreadSync API — enterprise data integration platform.
Preview: SDKs are in preview and installed from GitHub. NuGet packages will be available at GA.
git clone https://github.com/threadsync-infrastructure/threadsync-csharp.gitThen add a project reference to your .csproj:
<ProjectReference Include="../threadsync-csharp/src/ThreadSync.Sdk/ThreadSync.Sdk.csproj" />using ThreadSync.Sdk;
var client = new ThreadSyncClient("your-bearer-token");
// Create a connection
var connection = await client.Connections.CreateAsync("salesforce");
Console.WriteLine($"Connection ID: {connection.Id}, Status: {connection.Status}");
// Retrieve a connection
var fetched = await client.Connections.GetAsync(connection.Id);
// Create a sync
var config = new SyncConfig(
Source: new Endpoint(
Connection: "conn_salesforce_123",
Object: "Contact",
Table: "contacts"
),
Destination: new Endpoint(
Connection: "conn_postgres_456",
Object: "record",
Table: "salesforce_contacts"
),
Schedule: "0 * * * *"
);
var sync = await client.Sync.CreateAsync(config);
Console.WriteLine($"Sync ID: {sync.Id}, Status: {sync.Status}");
// Check sync status
var status = await client.Sync.GetAsync(sync.Id);
Console.WriteLine($"Records synced: {status.RecordsSynced}");| Parameter | Type | Description |
|---|---|---|
bearerToken |
string |
Your ThreadSync API key |
baseUrl |
string? |
Override the API base URL (optional) |
| Method | Description |
|---|---|
CreateAsync(provider) |
Create a new connection |
GetAsync(id) |
Retrieve a connection by ID |
| Method | Description |
|---|---|
CreateAsync(config) |
Create a new sync job |
GetAsync(id) |
Retrieve a sync job by ID |
Connection—Id,Provider,Name,StatusSyncConfig—Source(Endpoint),Destination(Endpoint),ScheduleEndpoint—Connection,Object,TableSync—Id,Status,RecordsSynced
- .NET 8.0 or later
MIT — see LICENSE for details.