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 Email By ID

curl --location 'https://api.nomsa.gov.kh/v1/transactional/email/{{emailId}}' \
--header 'Authorization: Bearer your_api_key'

Example Response

{
    "id": "95",
    "from": "NomsaSupportTeam <nomsa@dgc.gov.kh>",
    "recipient": "recipient@gmail.com",
    "params": {
        "body": "<p>Hello <b>there</b></p>",
        "from": "NomsaSupportTeam <nomsa@dgc.gov.kh>",
        "subject": "Test two attachments"
    },
    "attachments_metadata": [
        {
            "hash": "d879061289e2ac51ef64bba9fcf3a3b1",
            "fileName": "nomsa_sample1.csv",
            "fileSize": 62
        },
        {
            "hash": "e2834551a0349c3473387d0f7d17d22f",
            "fileName": "nomsa_sample2.csv",
            "fileSize": 38
        }
    ],
    "status": "OPENED",
    "error_code": null,
    "error_sub_type": null,
    "accepted_at": "2023-10-05T01:37:39.182Z",
    "sent_at": "2023-10-05T01:37:39.243Z",
    "delivered_at": "2023-10-05T01:37:40.771Z",
    "opened_at": "2023-10-05T01:37:54.786Z",
    "created_at": "2023-10-05T01:37:38.819Z",
    "updated_at": "2023-10-05T01:37:54.908Z",
    "classification": null,
    "tag": null,
    "cc": [],
    "bcc": []
}

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