> For the complete documentation index, see [llms.txt](https://postman-v1.guides.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://postman-v1.guides.gov.sg/email-api-guide/overview/api-response-formats.md).

# API Response Formats

Handling responses from the Postman API

{% hint style="warning" %}
**Updated Nov 2026: The Postman Legacy Team will not be providing support for our email API until further notice.**

**Set-up is fully self-service:** Our endpoints remain open, so you may continue to integrate with them if it is sufficient for your use case.

* However, if you experience any issues, we will not be able to provide any support due to limited resources.
* Onboarding to custom from-email addresses and attachments for API is not available.
  {% endhint %}

## 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).

{% hint style="info" %}
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 ([email](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/get-email-by-id-api.md), [SMS](broken://pages/mPRSGm6O3ITavUSlRUUQ)) to check the status of your message.
{% endhint %}

The following is an example of a JSON object received after sending an email via the [this endpoint](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/send-email-api.md) of our [programmatic email API](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api.md):

```json
{
  "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

```json
{
  "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. Refer to the error `code`(s) found in the respective sections of this guide.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://postman-v1.guides.gov.sg/email-api-guide/overview/api-response-formats.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
