Get Email by ID API

This API allows you to retrieve metadata about a specific email sent via our API via its id. The most common use case for this API is to check on the status of an email.

How It Works

To use this API, you must save the id field in the response returned when making an API call to send the email. For more information, see this section.

Get transactional email by ID

Get endpoint by email ID
GET /v1/transactional/email/{emailId}
eg. Request body via email ID
const response = await fetch('/v1/transactional/email/{emailId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
eg. Response body via email ID
{
  "id": 42,
  "from": "Postman <info@mail.postman.gov.sg>",
  "recipient": "hello@example.com",
  "params": {
    "body": "Hello World",
    "from": "Postman <info@mail.postman.gov.sg>",
    "subject": "Hello World",
    "reply_to": "hello@example.com"
  },
  "attachments_metadata": [
    {
      "fileName": "text",
      "fileSize": 0,
      "hash": "text"
    }
  ],
  "status": "DELIVERED",
  "error_code": null,
  "error_sub_type": null,
  "created_at": "2023-05-10T03:03:54.163Z",
  "updated_at": "2023-05-10T03:05:00.000Z",
  "accepted_at": "2023-05-10T03:03:55.406Z",
  "sent_at": "2023-05-10T03:04:01.912Z",
  "delivered_at": "2023-05-10T03:05:00.000Z",
  "opened_at": null,
  "classification": "FOR_ACTION",
  "tag": "hello world"
}

How do I retrieve the email ID?

Refer to this section of the guide for more information on how to retrieve the email ID.

What do each of the attributes in the response body mean?

Refer to this section of the guide for more information on attributes.

Limitations

We currently do not support pushing webhooks to your server when the status of an email changes. We are exploring the possibility of providing more email analytics, such as monthly reports aggregating statistics about email deliverability grouped based on user-defined tags. For more information, see this section.

Last updated