Hopp til innhold
DocsSDKHelpdesk

Helpdesk

Oppdatert juli 2026·1 min

Les supportsamtaler på tvers av kanaler og post svar — skrivebanen er idempotent, så nye forsøk sender aldri dobbelt.

Helpdesk-operatørinnboksen med samtalelisten.Helpdesk-operatørinnboksen med samtalelisten.

Raskt eksempel

Typesjekket mot @medalsocial/sdk v1.3.0 (2026-07-20). En utgivelse som endrer en signatur stopper denne sidens bygg.

ts
import { Medal } from '@medalsocial/sdk';

const medal = new Medal(process.env.MEDAL_API_KEY as string);

// Open conversations, newest first
const { data: conversations } = await medal.helpdesk.conversations.list({ limit: 10 });
const first = conversations[0];

// Read the thread
const { data: messages } = await medal.helpdesk.conversations.messages(first.id);
console.log(messages.length, 'messages');

// Reply (idempotency key required for capability-scoped tokens)
await medal.helpdesk.replies.create(
  { conversation_id: first.id, body: 'On it — checking your channel connection now.' },
  { idempotencyKey: `reply-${first.id}-1` }
);

medal.helpdesk.conversations.list()

List/search conversations with cursor-based pagination and optional filters.

ts
list(options?: ListConversationsOptions): Promise<PaginatedResponse<Conversation>>
Lagt til i v1.3.0

medal.helpdesk.conversations.get()

Get a conversation by ID.

ts
get(id: string): Promise<ApiResponse<Conversation>>
Lagt til i v1.3.0

medal.helpdesk.conversations.update()

Update a conversation's status and/or assignee (pass `assignee_user_id: null` to unassign).

ts
update(id: string, input: UpdateConversationInput, options?: RequestOptions): Promise<ApiResponse<ConversationUpdateResult>>
Lagt til i v1.3.0

medal.helpdesk.conversations.messages()

Read a conversation's messages with cursor-based pagination.

ts
messages(id: string, options?: PaginationOptions): Promise<PaginatedResponse<ConversationMessage>>
Lagt til i v1.3.0

medal.helpdesk.replies.create()

Send an operator reply or internal note. Returns HTTP 201.

Pass an `idempotencyKey` so retried requests do not create duplicate
messages — it is REQUIRED for capability-scoped tokens.

ts
create(input: CreateReplyInput, options?: RequestOptions): Promise<ApiResponse<ReplyCreateResult>>
Lagt til i v1.3.0