Install
npm install @beamdesk/sdkAPI requests authenticate with X-API-Key. Generate a scoped key in Beamdesk settings and keep it server-side unless your integration runs in a trusted environment.
Quick start
import { Beamdesk } from '@beamdesk/sdk';
const beam = new Beamdesk({
apiKey: process.env.BEAMDESK_API_KEY!,
baseUrl: 'https://beamdesk.preview.softblaze.net',
});
const ticket = await beam.tickets.create({
customer_email: 'user@example.com',
subject: 'Need help',
body: 'My issue...',
});
const list = await beam.tickets.list({ status: 'pending', limit: 50 });
await beam.tickets.reply(ticket.ticket_id, { body: 'Hi, we are looking into this.' });
const contact = await beam.contacts.upsert({
email: 'user@example.com',
name: 'Alice',
});
const article = await beam.knowledge.ingest({
title: 'How to reset a password',
content: 'Open Settings, then Security, then choose Reset password.',
status: 'published',
});