Emails
List emails
/api/v1/emails
List emails
Returns paginated inbound emails visible to the authenticated company.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
accountId |
query | integer[] | Filter by one or more internal account ids. |
accountExternalId |
query | string[] | Filter by one or more external account ids. |
agentId |
query | integer[] | Filter by one or more agent ids. |
conversationId |
query | integer[] | Filter by one or more conversation ids. |
fromEmail |
query | string[] | Filter by one or more sender email addresses. |
query |
query | string | Search sender email, sender name, and subject. |
receivedAt |
query | string | Filter to emails received at this exact ISO timestamp. |
receivedAt[gte] |
query | string | Filter to emails received at or after this ISO timestamp. |
receivedAt[lte] |
query | string | Filter to emails received at or before this ISO timestamp. |
sort |
query | string | Field used to sort the page. |
order |
query | string | Sort direction. Use |
cursor |
query | string | Opaque cursor returned by the previous page. Use it with the same sort and order values. |
limit |
query | integer | Maximum number of emails to return. |
Responses
| Status | Schema | Description |
|---|---|---|
200 |
EmailList | Inbound emails |
400 |
AgentError | Invalid query params |
401 |
AgentError | Missing or invalid auth |
Example 200 response
{
"data": [
{
"id": 1,
"fromEmail": "string",
"subject": "string",
"receivedAt": "string",
"createdAt": "string",
"conversation": {
"agent": {
"id": 1
}
}
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "string"
}
}
Example 400 response
{
"error": "string",
"message": "string",
"issues": [
{
"path": [
"string"
],
"message": "string",
"code": "string"
}
]
}
Example 401 response
{
"error": "string",
"message": "string",
"issues": [
{
"path": [
"string"
],
"message": "string",
"code": "string"
}
]
}