Usage

import Itzam from "itzam";

const itzam = new Itzam("YOUR_API_KEY");

const threads = await itzam.threads.list("customer-support", {
  lookupKeys: ["user-123", "platform-web-app"],
});

console.log(threads);

Parameters

ParameterTypeRequiredDescription
workflowSlugstringYesThe slug of the workflow.
lookupKeysstring[]NoA custom list of lookup keys to match.

Return Value

type ThreadsResponse = {
  threads: {
    id: string; // The unique thread ID
    name: string; // The thread name
    lookupKeys: string[]; // The lookup keys if provided
    contextSlugs: string[]; // The slugs of the contexts if provided
    createdAt: string; // ISO 8601 timestamp
    updatedAt: string; // ISO 8601 timestamp
  }[]; // Array of thread objects
};