Inbox-connect plumbing: searches the emails in a linked OAuth mailbox at the provider, before anything is imported. Pass nextPageToken back as pageToken for the next page. An extraction-code user may only name a mailbox linked to their own code (404 otherwise).
POST
/email-data/{caseId}/search-remote-emails
curl \
--request POST 'http://api.example.com/email-data/{caseId}/search-remote-emails' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"anyEmail": [
"string"
],
"to": [
"string"
],
"bcc": [
"string"
],
"cc": [
"string"
],
"from": [
"string"
],
"hasAttachment": true,
"receivedAfter": "string",
"receivedBefore": "string",
"keywords": [
"string"
],
"subject": "string",
"contactNames": [
"string"
],
"folders": [
"string"
],
"providerId": "string",
"pageToken": "string",
"limit": 42.0
}'
Request examples
{
"anyEmail": [
"string"
],
"to": [
"string"
],
"bcc": [
"string"
],
"cc": [
"string"
],
"from": [
"string"
],
"hasAttachment": true,
"receivedAfter": "string",
"receivedBefore": "string",
"keywords": [
"string"
],
"subject": "string",
"contactNames": [
"string"
],
"folders": [
"string"
],
"providerId": "string",
"pageToken": "string",
"limit": 42.0
}
Response examples (200)
{
"data": {
"data": [
{
"starred": true,
"unread": true,
"folders": [
"string"
],
"subject": "string",
"threadId": "string",
"body": "string",
"grantId": "string",
"id": "string",
"object": "string",
"snippet": "string",
"bcc": [
{}
],
"cc": [
"string"
],
"attachments": [
{}
],
"from": [
"string"
],
"to": [
"string"
],
"replyTo": [
"string"
],
"date": "2026-05-04T09:42:00Z",
"trackingOptions": {},
"hasAttachment": true,
"isDraft": true
}
],
"nextPageToken": "string"
},
"statusCode": 200,
"timestamp": "2026-01-15T10:15:00.000Z"
}