Skip to main content

Retrieving Threads

// By ID
const thread = await connection.getThread('thread-uuid');

// By external reference
const threads = await connection.getThreadsByRef({
  refKey: 'stripe_payment_id',
  refValue: 'pi_1234567890'
});

Query Options

OptionTypeDescription
refKeystringReference key
refValuestringReference value
statusstringactive, completed, cancelled
startedAfterstringISO timestamp filter
startedBeforestringISO timestamp filter
limitnumberMax results

Thread Properties

PropertyTypeDescription
idstringThread ID
statusstringactive, completed, cancelled
contractNamestringContract name
startedAtstringISO timestamp
completedAtstringISO timestamp
ownerIdstringCreator user/service

Next Steps