TypeScript SDK
PreviewThe RowCall TypeScript SDK, with typed runs, flows, calls, contacts, actions and signature checks for webhooks and action requests.
@rowcall/sdk is a small TypeScript client for the RowCall API, for Node.js 20 and later. It is Preview and ships to invited partners first. Every example in these docs also works with plain fetch.
Set up
import { RowCall } from '@rowcall/sdk'
// Keys are for servers only.
const rowcall = new RowCall({ apiKey: process.env.ROWCALL_API_KEY, baseUrl: 'https://app.rowcall.ai' })Start and follow a run
const run = await rowcall.runs.start(
{
flowKey: 'order_verification',
phone: '+919812345678',
name: 'Asha Rao',
inputs: {
customer_name: 'Asha',
order_id: '4821',
items: 'a pair of running shoes',
order_total: '2499',
address: '12 MG Road, Pune',
},
consent: {
scope: 'service',
source: 'checkout',
givenAt: '2026-10-13T09:20:00+05:30',
note: 'Ticked "Call me about this order" at checkout.',
},
metadata: { shopify_order_id: '5523981' },
},
{ idempotencyKey: 'verify-4821' },
)
const latest = await rowcall.runs.get(run.id)Every endpoint
The client has one method for each endpoint, grouped like the API: rowcall.me(), then rowcall.flows, rowcall.runs, rowcall.calls, rowcall.contacts and rowcall.actions. Each endpoint in the API reference shows its SDK call in the Node tab, next to curl and Python. Methods return the object itself (the run, the flow), not the { ok, … } wrapper, and requests that make something take { idempotencyKey } last.
Errors
A refused request throws a RowCallError with the HTTP status, the stable errorCode and a message you can log.
import { RowCallError } from '@rowcall/sdk'
try {
await rowcall.runs.start(input, { idempotencyKey: `verify-${orderId}` })
} catch (error) {
if (error instanceof RowCallError && error.errorCode === 'NO_CONSENT') {
// Ask the shopper for consent at checkout instead.
} else throw error
}Verify what RowCall sends
verifyWebhook and verifyActionRequest check the RowCall-Signature header and return true or false. Pass the raw body, before any JSON parsing.
import { verifyWebhook } from '@rowcall/sdk'
const isGenuine = verifyWebhook({
body: rawBody,
signature: request.headers['rowcall-signature'],
secret: process.env.ROWCALL_SIGNING_SECRET,
})Both accept either v1 value after a secret roll, and reject signatures more than 5 minutes old (change it with toleranceSeconds). See Webhooks and Actions.
Apps that act for merchants
RowCallOAuth builds the connect link and swaps and refreshes tokens, and new RowCall({ accessToken, refresh }) refreshes once by itself when a request gets 401. See Build an integration.
See how Glood and other platforms connect RowCall to their merchants.