Cinch - Documentation

SDKs

Strongly-typed client libraries for the Cinch Core REST API in C#, Python and TypeScript.

Overview

The SDKs are generated by Microsoft Kiota from the live OpenAPI document of the Core API (https://api.cinchsoftware.io, API version v2), so they cover the same endpoints as the API Reference. Every request and response is a typed model.

All calls authenticate with the cds-apikey request header. See Authentication for how the header works.

Downloads

SDK version , API , generated with .

DownloadMaturitySizeSHA-256File

Get started

Download a package, unzip it, then follow the install step and quickstart for your language.

// Install: unzip, then
//   dotnet add reference Cinch.Sdk/Cinch.Sdk.csproj
// (pulls in Microsoft.Kiota.Bundle)

using Cinch.Sdk;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;

// The Cinch API authenticates with a "cds-apikey" request header.
var auth = new ApiKeyAuthenticationProvider(apiKey, "cds-apikey", ApiKeyAuthenticationProvider.KeyLocation.Header);
var client = new CinchClient(new HttpClientRequestAdapter(auth));

// GET /api/support/cases/{id}
var supportCase = await client.Api.Support.Cases["12345"].GetAsync();
Console.WriteLine(supportCase?.Subject);
# Install: unzip, then
#   pip install ./cinch-sdk-python

import asyncio

from kiota_abstractions.authentication import ApiKeyAuthenticationProvider, KeyLocation
from kiota_http.httpx_request_adapter import HttpxRequestAdapter

from cinch_sdk.cinch_client import CinchClient


async def main(api_key: str) -> None:
    # The Cinch API authenticates with a "cds-apikey" request header.
    auth = ApiKeyAuthenticationProvider(KeyLocation.Header, api_key, "cds-apikey")
    client = CinchClient(HttpxRequestAdapter(auth))

    # GET /api/support/cases/{id}
    support_case = await client.api.support.cases.by_case_id("12345").get()
    print(support_case.subject if support_case else None)


asyncio.run(main("YOUR-API-KEY"))
// Install: unzip, then
//   npm install ./cinch-sdk-typescript/cinch-sdk-<version>.tgz
// (<version> is the version in the .tgz file inside the zip.)
// Requires Node 18+; ESM.

import { ApiKeyAuthenticationProvider, ApiKeyLocation } from "@microsoft/kiota-abstractions";
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import { createCinchClient } from "cinch-sdk";

async function main(apiKey: string): Promise<void> {
  // The Cinch API authenticates with a "cds-apikey" request header.
  const auth = new ApiKeyAuthenticationProvider(apiKey, "cds-apikey", ApiKeyLocation.Header);
  const client = createCinchClient(new FetchRequestAdapter(auth));

  // GET /api/support/cases/{id}
  const supportCase = await client.api.support.cases.byCaseId("12345").get();
  console.log(supportCase?.subject);
}

main("YOUR-API-KEY");

Method naming

The client mirrors the URL path, with the HTTP method as the final call. For example, GET /api/support/cases/{id} is:

LanguageCall
C#client.Api.Support.Cases["12345"].GetAsync()
Pythonclient.api.support.cases.by_case_id("12345").get()
TypeScriptclient.api.support.cases.byCaseId("12345").get()

Notes

  • Kiota rates the C# and Python generators Stable. Its TypeScript generator is labelled Preview by Microsoft, so expect that SDK to change more.
  • The SDKs are regenerated from the API whenever it changes, so method names track the API.
  • PowerShell module: planned.
  • Need another language? Download cinch-openapi.json from the table above and feed it to any generator, such as OpenAPI Generator.