API reference / Threads

List threads

List threads filtered by labels or triage of the latest message. A sent reply clears the thread triage until a new incoming message arrives.

GET/v1/inboxes/{inboxId}/threads

Requires an API key with the messages:read scope. MCP tool: list_threads. CLI: goshenemail threads list.

Request

Path parameters

NameTypeRequiredNotes
inboxIdstring (email)Yesup to 254 characters

Query parameters

NameTypeRequiredNotes
category"billing" | "support" | "sales" | "personal" | "notification" | "other"
needsReply"yes" | "no" | "uncertain"
urgency"low" | "normal" | "high" | "critical"
limitinteger1–100, default 20
pageTokenstringup to 200 characters
labelsstring[]up to 50 items
includeTrashbooleandefault false

Response

FieldTypeNotes
threadsobject[]
threadIdstring
inboxIdstring
subjectstring
previewstring
timestampstring
triageobject | object | object
statusstring
code"provider_unavailable" | "provider_rejected" | "invalid_response"
failedAtstring (ISO 8601)
versionnumber
modelstring1–100 characters
analyzedAtstring (ISO 8601)
durationMsintegerat least 0
bodyTruncatedboolean
usageobject
categoryobject
needsReplyobject
urgencyobject
messageCountnumber
labelsstring[]
sendersstring[]
recipientsstring[]
receivedTimestampstring
sentTimestampstring
lastMessageIdstring
attachmentCountnumber
nextPageTokenstring

Errors return { "error": { "code", "message", "transient" } } with a 4xx or 5xx status. See Errors.

Examples

curl

curl "https://api.goshenemail.com/v1/inboxes/research%40agents.goshenemail.com/threads" \
  -H "Authorization: Bearer $GOSHENEMAIL_API_KEY"

CLI

goshenemail threads list --inbox-id "research@agents.goshenemail.com"