This endpoint retrieves a paginated list of all email conversation threads for the authenticated user. Threads group related emails together based on Message-ID headers and subject lines, providing a conversation-based view of your emails.
Use the domain parameter to easily retrieve all threads for a specific domain. This is useful for filtering conversations by customer domain or organization.
Copy
Ask AI
import { Inbound } from '@inboundemail/sdk'const inbound = new Inbound('YOUR_API_KEY')// Get all threads with participants from example.comconst { data: threads, error } = await inbound.thread.list({ domain: 'example.com', limit: 50})if (error) { console.error('Error:', error)} else { console.log(`Found ${threads.threads.length} threads with example.com participants`)}
Use the address parameter to retrieve all threads involving a specific email address. This is perfect for customer support workflows or account-based filtering.
Copy
Ask AI
import { Inbound } from '@inboundemail/sdk'const inbound = new Inbound('YOUR_API_KEY')// Get all threads with a specific participantconst { data: threads, error } = await inbound.thread.list({ address: 'customer@example.com', limit: 25})if (error) { console.error('Error:', error)} else { console.log(`Found ${threads.threads.length} threads with customer@example.com`)}