Quickstart

Get up and running with the Helmdesk SDK in under 2 minutes.

1. Install the SDK

npm install @helmdesk/sdk

2. Create a client

Grab your project API key from Dashboard → Project → API Keys and initialize the client:

import { HelmdeskClient } from '@helmdesk/sdk'

const helmdesk = new HelmdeskClient({
  apiKey: process.env.HELMDESK_API_KEY!,
})

3. Create your first ticket

const ticket = await helmdesk.tickets.create({
  subject: 'Cannot login',
  body: 'I keep getting a 403 error when trying to sign in.',
  customerEmail: 'user@example.com',
  customerName: 'Jane Smith',
  priority: 'high',
})

console.log(ticket.number) // e.g. 42

4. Send an email

After configuring an email provider and creating a template in the dashboard:

await helmdesk.emails.send({
  templateKey: 'welcome',
  to: { email: 'user@example.com', name: 'Jane' },
  variables: { activationUrl: 'https://myapp.com/activate/abc' },
})

Next steps