Guides

TypeScript SDK

Use the first-party server-side client for typed resources, pagination, and structured errors.

Reviewed November 3, 2026·AI-readable

Install

bash
npm install @trovv/sdk

Create a client

ts
import { TrovvClient } from '@trovv/sdk'

const trovv = new TrovvClient({
  token: process.env.TROVV_API_TOKEN!,
  baseUrl: 'https://app.trovv.io/api/v1'
})

Create a draft

ts
const accounts = await trovv.listAccounts({ limit: 25 })
const draft = await trovv.createPost({
  text: 'Hello from Trovv', delivery: 'draft',
  targets: [{ accountId: accounts.data[0].id }]
}, { idempotencyKey: 'sdk-draft-001' })

Package availability

Verify before publishing this guide

The repository contains SDK-oriented documentation, but package publication and registry availability must be confirmed before announcing the package as generally available.

Was this page helpful?