Nomsa Guide
  • 👋About Nomsa
  • Campaign Guide - General
    • 🚀How to send a campaign?
  • Campaign Guide - Email
    • 📧Email Campaigns - Basics
      • Scheduled Sending
      • Bounced Emails and Halted Campaigns
      • Email Statistics
      • Formatting your Message Template
      • Variable Fields
      • Unique URL Link per Recipient
      • Pasting Content from Microsoft Word
      • Manage your Unsubscriptions
      • Understanding Unsubscriptions
    • 🔐Sending Password-Protected Emails
      • Tutorial
  • Campaign Guide - SMS
    • 📲SMS Campaigns - Basics
    • SMS Onboarding Overview
      • How do I send SMS
  • Campaign Guide - Telegram
    • 🤖Telegram Campaigns - Basics
      • Add Telegram Bot Token in Nomsa
      • Instructions for Recipient Onboarding
      • Use the Bot in the Campaign
      • Telegram Formatting
      • Telegram Bot Statistics
  • Api Guide
    • 📖Overview
      • API Response Formats
      • Bearer Authentication
      • Generate your API Key
      • Rotate your API Key
    • 📨Programmatic Email API
      • Custom From Address
      • Tracking Email Status
      • Send Email API
        • From Name and From Address
        • CC and BCC
        • Recipient Blacklist
        • Email Tagging and Classification
        • Email Body
          • Embedding Images
            • Linked Images
            • Content-ID Images
        • Attachments
        • Rate Limit
      • Get Email by ID API
      • List Emails API
    • 📬Programmatic SMS API
Powered by GitBook
On this page
  • How It Works
  • Get Email By ID
  • Example Response
  • Limitations
  1. Api Guide
  2. Programmatic Email API

Get Email by ID API

PreviousRate LimitNextList Emails API

Last updated 11 days ago

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 .

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
this section