> 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/programmatic-email-api/send-email-api/email-body.md).

# Email Body

{% 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 %}

The `body` field in the request body is the email body. API user can provide the email body in either plain text or HTML format.

## Size Limit

The `body` field can accept up to 1MB of data. If the email body exceeds the size limit, the API will return a `400 Bad Request` error.

In fact, we recommend that you keep your email body within 100KB for the following reasons:

* The larger your email body, the longer it takes for your API call to complete.
* Popular web clients like Gmail will clip emails that are larger than this size.
  * This means users will have to click on a link to view the full email, resulting in a worse user experience.
  * To track open rates, we embed a 1x1 pixel image in the email. If the email is clipped, there is a chance that the image will not be loaded, thus affecting the accuracy of the open rate. For more information, see [this section](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/tracking-email-status.md#tracking-open-rates)
  * The exact clipping limit is not known, but it is estimated to be around 102KB.

<figure><img src="https://4126954886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAQH3DF49Lq0AJudrbF%2Fuploads%2Fgit-blob-199bb561f3aa6132ac9e111fda2d33552b062d6e%2Fmessage-clipped.png?alt=media" alt=""><figcaption><p>A clipped message on Gmail</p></figcaption></figure>

## HTML Sanitisation

The `body` field passed in the request body will be sanitised to prevent XSS attacks. The exact sanitisation process can be [found here](https://github.com/opengovsg/postmangovsg/blob/master/shared/src/templating/xss-options.ts).

The easiest way to check the HTML output of your sanitised input is to make use of this [email editor](https://editor.postman.gov.sg/).

This same sanitisation process is applied to campaign emails.

## Embedding Images

For more information on embedding images within the body of your email, go to [this section](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/send-email-api/email-body/embedding-images.md).


---

# 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/programmatic-email-api/send-email-api/email-body.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.
