Skip to main content

Basic Connection

import { Threadify } from '@threadify/sdk';

const threadify = await Threadify.connect('your-api-key', 'my-service');
await threadify.close()

Parameters

ParameterTypeRequiredDescription
apiKeystringYesYour Threadify API key
serviceNamestringNoService identifier (e.g., ‘payment-service’)
optionsobjectNoConnection options

Options

OptionTypeDefaultDescription
maxInFlightnumber10Max pending notifications (max: 100)
reconnectbooleantrueAuto-reconnect on disconnect
timeoutnumber30000Connection timeout (ms)
Never commit API keys to version control. Use environment variables or secret managers/vault.

Next Steps

Tracking Workflows

Start tracking your first workflow

Handling Failures

Learn how to handle step failures