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 incoming email log

GET
https://api.mercoa.com/entity/:entityId/emailLog/:logId
GET
/entity/:entityId/emailLog/:logId
$curl https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/emailLog/log_8545a84e-a45f-41bf-bdf1-33b42a55812c \
> -H "Authorization: Bearer <token>"
1{
2 "id": "1234",
3 "status": "PROCESSED",
4 "subject": "Invoice #1234",
5 "from": "John Doe <john.doe@example.com>",
6 "to": "Jane Doe <jane.doe@example.com>",
7 "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>",
8 "textBody": "Hi Jane,\n\nPlease find attached the invoice for your recent purchase.\n\nThanks,\nJohn",
9 "createdAt": "2021-01-01T00:00:00Z",
10 "attachment": {
11 "filename": "invoice.pdf",
12 "contentType": "application/pdf"
13 }
14}
Get an email log by ID
Was this page helpful?
Previous

Get All

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
logIdstringRequired

Response

This endpoint returns an object.
idstring
statusenum
The status of the email log. If the status is PENDING, the email has not been processed yet. If the status is PROCESSED, the email has been processed and the invoice has been created. If the status is FAILED, the email was not processed due to an error.
Allowed values:
subjectstring
fromstring
tostring
htmlBodystring
textBodystring
createdAtdatetime
attachmentobject
invoiceIdstring

Errors

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