Postman Guide
Go to Postman v1
  • 🥳About Postman v1 (Postman Legacy)
  • Campaign Guide - General
    • 🚀How to send a campaign?
      • ☝️Before You Start
        • Demo Mode
  • Campaign Guide - Email
    • 📧Email Campaigns - Basics
      • How do I send an email campaign?
      • 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
      • Template Editor
  • Campaign Guide - SMS
    • 📲SMS Campaigns - Basics
      • Before Starting Out
      • Summary of Costs
    • 🪜SMS Onboarding Overview
      • Step 1: Sender ID Registration
      • Step 2: Sign up for a Twilio account
      • Step 3: Set up your Twilio account
      • Step 4: Configure Your Twilio Account
        • What if I need to buy a phone number?
      • Step 5: Send a Test Message on Twilio
      • Step 6: Fill in your Twilio credentials in Postman!
        • How do I send a campaign with my saved SMS credentials?
    • 🤔What else do I need to know about sending SMSes?
      • More about Sender ID registration
      • Can I see the send status of my campaign?
      • How can I configure my SMS send rate?
      • Sending an SMS to a Foreign Number
      • SMS Best Practices
      • Useful Twilio Links
  • Campaign Guide - Telegram
    • 🤖Telegram Campaigns - Basics
      • How do I set up Telegram to send my campaigns?
      • Add Telegram Bot Token in Postman
      • Instructions for Recipient Onboarding
      • Use the Bot in the Campaign
      • Telegram Formatting
      • Telegram Bot Statistics
  • Email API Guide
    • 📖Overview
      • IM8 Policies
      • Connecting your Intranet Application
      • API Response Formats
    • 🗝️Email API Key Management
      • Bearer Authentication
      • Generate your email API Key
      • Rotate your email API Key
    • 📨Programmatic Email API
      • Getting Started
      • Comparison with AMR
      • SG-Mail Whitelisting
      • 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 GovSG WhatsApp API
      • Getting Started
      • Tracking Message Status
      • Get Available Templates API
      • Send Message API
      • Get Message by ID API
      • List Messages API
    • 🎓Frequently Asked Questions
  • FAQ
    • 📶Service Status
    • For Recipients
      • Check Email Authenticity
    • For Senders
      • Messaging Channel Comparison
      • Cost Breakdown
  • Legal
    • Terms & Conditions
    • Privacy Policy
  • Contact Us
  • GitHub
Powered by GitBook
On this page
  • HTTP Status Codes
  • Format of Successful Responses
  • Format of Error Responses

Was this helpful?

  1. Email API Guide
  2. Overview

API Response Formats

Handling responses from the Postman API

PreviousConnecting your Intranet ApplicationNextEmail API Key Management

Last updated 1 year ago

Was this helpful?

HTTP Status Codes

Postman uses conventional API Responses Codes to indicate the success or failure of an API request.

Code
Description

200 - OK

Everything worked as expected

201 - Created

Resource created. The message is being sent.

202 - Accepted

We have accepted the request, but processing has not been completed. This is usually used for long-running processes like handling uploads of recipient lists to generate messages for campaigns.

400 - Bad Request

The request was rejected. This is likely caused by missing required parameters or parameters supplied in an incorrect format.

401 - Unauthenticated

Invalid API key provided.

403 - Forbidden

User doesn't have permission to perform the request, could be due to resources are in an invalid state for the operation.

404 - Not Found

The requested resource doesn't exist.

410 - Gone

Data has been redacted from Postman.

413 - Content Too Large

Number of attachments or size of attachments exceeded limit.

429 - Too Many Requests

Rate limit exceeded. Too many requests.

500 - Internal Server Error.

Something went wrong on Postman's end. (These are rare.)

Format of Successful Responses

All responses to successful requests to the Postman API will be returned in JSON format with a HTTP status code in the 2xx range. The response will contain information about the resources that are being acted on (e.g. creation, retrieval).

Sending messages is an asynchronous process. As such, a successful API request to our message sending endpoints simply mean the request has been made successfully. It does not mean that your message has been sent or delivered successfully. To check this, you should call the respective endpoints (, SMS) to check the status of your message.

The following is an example of a JSON object received after sending an email via the of our :

{
  "id": "42",
  "from": "Postman.gov.sg <donotreply@mail.postman.gov.sg>",
  "recipient": "hello@example.com",
  "params": {
    "body": "Hello World",
    "from": "Postman.gov.sg <donotreply@mail.postman.gov.sg>",
    "subject": "Hello World",
    "reply_to": "hello@example.com"
  },
  "attachments_metadata": [
    {
      "fileName": "example.pdf",
      "fileSize": 1240,
      "hash": "8743b52063cd84097a65d1633f5c74f5"
    }
  ],
  "status": "ACCEPTED",
  "error_code": null,
  "error_sub_type": null,
  "created_at": "2023-05-10T03:03:55.406Z",
  "updated_at": "2023-05-10T03:03:55.406Z",
  "accepted_at": "2023-05-10T03:03:55.406Z",
  "sent_at": null,
  "delivered_at": null,
  "opened_at": null,
  "classification": "FOR_ACTION",
  "tag": "hello world"
}

Format of Error Responses

For error responses (with non-2xx codes), the response will be in JSON format with these fields

{
  "code": "error code for this specific error type",
  "message": "human-readable explanation of the error and possibly the next step"
}

Ideally, most of our errors are expected to happen during development process for your system and to serve as guidelines for your developers. However, some might happen for your production system (for e.g. 429 rate_limit error), in which case, using the code field is a reliable way to programmatically handle those error flows. All error code(s) can be found in or under the respective sections of this guide.

📖
email
this endpoint
programmatic email API
our Swagger documentation