curl -X GET https://api.gork.email/v1/threads/thrd_128bca90f4 \
-H "Authorization: Bearer gk_live_YOUR_API_KEY"
import { GorkClient } from "@gorkmail/sdk"
const client = new GorkClient({ apiKey: process.env.GORK_API_KEY })
const thread = await client.threads.get("thrd_128bca90f4")
console.log(`Thread contains ${thread.messages.length} messages.`)
{
"data": {
"id": "thrd_128bca90f4",
"inboxId": "inbox_728af980b4e",
"subject": "Re: Partnership opportunity",
"lastMessageAt": "2026-09-07T12:30:00.000Z",
"messages": [
{
"id": "msg_001",
"direction": "inbound",
"from": "prospect@acmecorp.com",
"to": ["alex@outbound.yourdomain.com"],
"text": "Hi Alex, we would be interested in seeing a demo.",
"createdAt": "2026-09-07T11:00:00.000Z"
},
{
"id": "msg_002",
"direction": "outbound",
"from": "alex@outbound.yourdomain.com",
"to": ["prospect@acmecorp.com"],
"text": "Sounds great! How does Thursday at 2pm PT look?",
"createdAt": "2026-09-07T11:15:00.000Z"
}
]
}
}
Threads
Get Thread
Retrieve a complete conversation thread including all messages in chronological sequence.
GET
/
v1
/
threads
/
{id}
curl -X GET https://api.gork.email/v1/threads/thrd_128bca90f4 \
-H "Authorization: Bearer gk_live_YOUR_API_KEY"
import { GorkClient } from "@gorkmail/sdk"
const client = new GorkClient({ apiKey: process.env.GORK_API_KEY })
const thread = await client.threads.get("thrd_128bca90f4")
console.log(`Thread contains ${thread.messages.length} messages.`)
{
"data": {
"id": "thrd_128bca90f4",
"inboxId": "inbox_728af980b4e",
"subject": "Re: Partnership opportunity",
"lastMessageAt": "2026-09-07T12:30:00.000Z",
"messages": [
{
"id": "msg_001",
"direction": "inbound",
"from": "prospect@acmecorp.com",
"to": ["alex@outbound.yourdomain.com"],
"text": "Hi Alex, we would be interested in seeing a demo.",
"createdAt": "2026-09-07T11:00:00.000Z"
},
{
"id": "msg_002",
"direction": "outbound",
"from": "alex@outbound.yourdomain.com",
"to": ["prospect@acmecorp.com"],
"text": "Sounds great! How does Thursday at 2pm PT look?",
"createdAt": "2026-09-07T11:15:00.000Z"
}
]
}
}
Retrieve the full conversation thread by ID. When AI agents process ongoing emails, accessing the complete thread ensures the model has the full conversational context.
Path Parameters
string
required
The unique ID of the conversation thread (
thrd_...).Response
object
curl -X GET https://api.gork.email/v1/threads/thrd_128bca90f4 \
-H "Authorization: Bearer gk_live_YOUR_API_KEY"
import { GorkClient } from "@gorkmail/sdk"
const client = new GorkClient({ apiKey: process.env.GORK_API_KEY })
const thread = await client.threads.get("thrd_128bca90f4")
console.log(`Thread contains ${thread.messages.length} messages.`)
{
"data": {
"id": "thrd_128bca90f4",
"inboxId": "inbox_728af980b4e",
"subject": "Re: Partnership opportunity",
"lastMessageAt": "2026-09-07T12:30:00.000Z",
"messages": [
{
"id": "msg_001",
"direction": "inbound",
"from": "prospect@acmecorp.com",
"to": ["alex@outbound.yourdomain.com"],
"text": "Hi Alex, we would be interested in seeing a demo.",
"createdAt": "2026-09-07T11:00:00.000Z"
},
{
"id": "msg_002",
"direction": "outbound",
"from": "alex@outbound.yourdomain.com",
"to": ["prospect@acmecorp.com"],
"text": "Sounds great! How does Thursday at 2pm PT look?",
"createdAt": "2026-09-07T11:15:00.000Z"
}
]
}
}