Get started with the SDK
The official TypeScript SDK for the Medal Social API — typed access to posts, contacts, deals, emails, helpdesk, webhooks, and GDPR tooling. This reference is generated from the published package (currently v1.3.0) and every example is type-checked against it.


On this page
Install
ts
npm install @medalsocial/sdk
# or
pnpm add @medalsocial/sdkAdded in v1.3.0: helpdesk, webhooks
Quick example
Type-checked against @medalsocial/sdk v1.3.0 (2026-07-20). A release that changes a signature fails this page's build.
ts
import { Medal } from '@medalsocial/sdk';
// API keys are prefixed medal_ and scoped to one workspace —
// create one under Settings → API keys.
const medal = new Medal(process.env.MEDAL_API_KEY as string);
// Your first call: which channels can this workspace post to?
const { data: channels } = await medal.posts.channels();
console.log(channels.map((c) => c.platform));
// Create and schedule a post
const { data: post } = await medal.posts.create({
content: 'Hello from the Medal Social SDK!',
channel_ids: [channels[0].id],
});
await medal.posts.schedule(post.id, { scheduled_at: '2026-08-01T09:00:00Z' });medal.*
Medal Social SDK client.
Supports both API key and OAuth access token authentication:
medal.emails — Emails
medal.contacts — Contacts
medal.deals — Deals
medal.gdpr — Gdpr
medal.helpdesk — Helpdesk
medal.posts — Posts
medal.webhooks — Webhooks
medal.workspaces — Workspaces
medal.emails.templates — EmailTemplates