# Generate your email API Key

## Log into Postman

{% hint style="info" %}
For [Programmatic Email API](/email-api-guide/programmatic-email-api.md) users, if you wish to use a [custom from address](/email-api-guide/programmatic-email-api/custom-from-address.md), please note that the email address with which you use to log into Postman must be the same as the address from which you wish to send emails.
{% endhint %}

Before you start using our API, you have to generate an API key. All users must log into our web application at <https://legacy.postman.gov.sg/> to generate this API key. This API key can be used to make API calls and serve to authenticate you to our system.

{% hint style="danger" %}
**Keep this API key secret.** Unauthorised disclosure of this API key will allow others to impersonate you when calling our system.
{% endhint %}

## Where to generate your email API key

* **(Updated 1 Apr 2024)** Please generate your API key through our new site <https://legacy.postman.gov.sg/>

## Generate your email API Key

<figure><img src="/files/fvUSVasGbI8Hl62i2mS9" alt=""><figcaption></figcaption></figure>

To generate this token, navigate to `Settings` and click on `Generate API Key`.

<figure><img src="/files/BKX64U2Ombt2tKcRuIWM" alt=""><figcaption></figcaption></figure>

1. **We support multiple API keys per account.** To distinguish among multiple API keys, choose a label for your API key. This label is permanent and cannot be changed. You can associate each label to the corresponding API key based on the last 5 digits of the API key shown on Postman's `Settings` page (see below).
2. **Enter contact emails that will receive updates regarding this API key.** We are aware that our API users often create accounts on Postman using email addresses that are not meant to receive incoming emails. As such, it is important to enter email addresses whose inboxes are checked regularly. You can return to this user interface to update this list of contact emails.

<figure><img src="/files/iZ7DGF7fnjuwE7hEvbHT" alt=""><figcaption></figcaption></figure>

After clicking `Generate Key`, your API key will be successfully created. Your API key will be of the format `username_v1_xxxxx`. Copy the newly created API key and store it securely. We only store the last 5 digits of your API key. If you lose this API key, we will not be able to recover the API key and you will have to generate a new one.

<figure><img src="/files/qRcAa7XZoRGQbO3EBpqW" alt=""><figcaption></figcaption></figure>

1. As mentioned previously, you can associate each label to the corresponding API key based on the last 5 digits of the API key shown on Postman's `Settings` page.
2. Newly created API keys **will be valid for 6 months from the time of creation**.
3. For API keys that had been created prior to our multiple API key feature, the key label will shown as `default` and the last 5 digits are `*****`.
4. API keys that had been created prior to our multiple API key feature will expire on **21 April 2024, 08:00 GMT+8**.

{% hint style="info" %}
To keep your system secure, Postman's API keys automatically expire and you should rotate your Postman API key on a regular basis. We will send reminders to your the contact emails provided above when prior to expiry. For more information, [click here](/email-api-guide/api-key-management/rotate-your-api-key.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://postman-v1.guides.gov.sg/email-api-guide/api-key-management/generate-your-api-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
