Deployments.ai Docs
Agent Email

Search inbox threads

POST /v1/agent-email/inboxes/{inboxId}/threads/search · SDK searchAgentEmailThreads · CLI deployments inbox-thread search

POST
/v1/agent-email/inboxes/{inboxId}/threads/search

Requires agent-email:read. A suspended organization can still call it.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

inboxId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
cursor?string
Length1 <= length <= 4096
from?string
Match^\S[\s\S]*\S$|^\S$|^$
Length3 <= length <= 320
hasAttachments?boolean
limit?integer
Range1 <= value <= 100
participants?array<>
Itemsitems <= 50
query?string
to?string
Match^\S[\s\S]*\S$|^\S$|^$
Length3 <= length <= 320

Response Body

AgentEmailThreadPageResponse

application/json
  1. response
items*array<>
nextCursor?|null
curl -X POST "https://example.com/v1/agent-email/inboxes/string/threads/search" \  -H "x-deployments-environment: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "items": [    {      "createdAt": "2019-08-24T14:15:22Z",      "id": "string",      "inboxId": "string",      "lastMessageAt": "2019-08-24T14:15:22Z",      "messageCount": 0,      "organizationId": "string",      "participants": [        "string"      ],      "subject": "string",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}