SDKs (Beta)

Collate provides beta Python and TypeScript SDKs for teams that want typed methods and less HTTP boilerplate. The REST API remains the canonical integration surface.

Use the SDKs only if your organization has SDK beta access. Otherwise, build against the REST guides and API reference.

Choose REST or SDK

Use the SDK whenUse raw HTTP when
Your organization has SDK beta access.You are building the primary integration path.
You are building in Python or TypeScript.You need a language without an SDK.
You want typed request and response objects.You need direct control over each HTTP call.
You are comfortable with beta client libraries.You are debugging wire-level behavior.

The SDKs wrap the same lifecycle contract: create one Authorization, read its latest state, and send the next command only when the authorization asks for it.

Install

$npm install @collate/sdk

Both SDKs use the same environment variables:

$export COLLATE_API_KEY="your-sandbox-api-key"
$export COLLATE_BASE_URL="https://api.sandbox.trycollate.ai"

Use https://api.sandbox.trycollate.ai for sandbox and https://api.trycollate.ai for production.

Create an authorization

1import { randomUUID } from "node:crypto";
2import { CollateClient } from "@collate/sdk";
3
4const collate = new CollateClient({
5 apiKey: process.env.COLLATE_API_KEY,
6 environment: process.env.COLLATE_BASE_URL ?? "https://api.sandbox.trycollate.ai",
7});
8
9const authorization = await collate.authorizations.create({
10 "Idempotency-Key": randomUUID(),
11 providerNpi: "1234567893",
12 request: {
13 payerId: "payer_aetna",
14 coverageState: "CA",
15 requestType: "drug",
16 serviceCode: { system: "hcpcs", code: "J0791" },
17 },
18 policy: { finalSubmission: "requires_approval" },
19 metadata: { externalCaseId: "case_789" },
20});
21
22console.log(authorization.id, authorization.status, authorization.nextAction?.type);

Method groups

TypeScriptPythonUse it for
authorizationsauthorizationsCreate, list, retrieve, confirm, and cancel authorizations.
authorizations.answersauthorizations.answersPatch questionnaire answers.
authorizations.attachmentsauthorizations.attachmentsList, attach, and remove linked files.
authorizations.requirementsauthorizations.requirementsRetrieve the current blocker set.
authorizationRoutesauthorization_routesList and resolve serviceable payer routes.
filesfilesCreate, complete, retrieve, and download file resources.
payers, providerspayers, providersRead payer metadata and tenant provider catalog entries.
authorizations.liveSessionauthorizations.live_sessionRead live-session state and create read-only access grants.
authorizations.manualHandoffsauthorizations.manual_handoffsAccept, grant access to, complete, revoke, or report handoffs.

Next steps