For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
  • API Reference
      • GETSearch entities
      • POSTCreate entity
      • GETGet entity
      • POSTUpdate entity
      • DELDelete entity
      • POSTAccept Terms of Service
      • POSTInitiate KYB
      • POSTGenerate JWT Token
      • GETGenerate Onboarding Link
      • POSTSend Onboarding Email
      • GETEvents
        • GETGet all incoming email logs
        • GETGet incoming email log
Logo
Sign inBook a demo
API ReferenceEntityEmail Log

Get all incoming email logs

GET
https://api.mercoa.com/entity/:entityId/emailLogs
GET
/entity/:entityId/emailLogs
$curl https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/emailLogs \
> -H "Authorization: Bearer <token>"
1{
2 "count": 1,
3 "hasMore": false,
4 "data": [
5 {
6 "id": "1234",
7 "status": "PROCESSED",
8 "subject": "Invoice #1234",
9 "from": "John Doe <john.doe@example.com>",
10 "to": "Jane Doe <jane.doe@example.com>",
11 "htmlBody": "<html><body><p>Hi Jane,</p><p>Please find attached the invoice for your recent purchase.</p><p>Thanks,</p><p>John</p></body></html>",
12 "textBody": "Hi Jane,\n\nPlease find attached the invoice for your recent purchase.\n\nThanks,\nJohn",
13 "createdAt": "2021-01-01T00:00:00Z",
14 "attachment": {
15 "filename": "invoice.pdf",
16 "contentType": "application/pdf"
17 }
18 }
19 ]
20}
Get all incoming invoice emails for an entity.
Was this page helpful?
Previous

Get incoming email log

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

entityIdstringRequired
Entity ID or Entity ForeignID

Query parameters

startDatedatetimeOptional
endDatedatetimeOptional
limitintegerOptional
Number of logs to return. Limit can range between 1 and 100, and the default is 10.
startingAfterstringOptional
The ID of the log to start after. If not provided, the first page of logs will be returned.
searchstringOptional
Search for logs by email address or subject

Response

This endpoint returns an object.
countinteger
Total number of logs for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available.
hasMoreboolean
True if there are more logs available for the given filters.
datalist of objects

Errors

400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
409
Conflict
500
Internal Server Error
501
Unimplemented