> 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-govsg-api/get-message-by-id-api.md).

# Get Message by ID API

This API allows you to retrieve metadata about a specific message sent via our API via its `id`. The most common use case for this API is to check on the status of a message.

## How It Works

{% hint style="info" %}
To use this API, you must save the `id` field in the response returned when making an API call to send the Gov.sg message.
{% endhint %}

{% openapi src="<https://api.postman.gov.sg/openapi.yaml>" path="/transactional/govsg/{messageId}" method="get" expanded="false" fullWidth="false" %}
<https://api.postman.gov.sg/openapi.yaml>
{% endopenapi %}

## Example Response

```json
{
  "id": "505",
  "recipient": "+6581489408",
  "template_id": "1",
  "params": {
    "topic": "document collection",
    "agency": "Open Government Products",
    "timeslot": "1-3PM",
    "officer_name": "John Tan",
    "recipient_name": "Stanley Nguyen",
    "officer_designation": "Reception Officer"
  },
  "language_code": "en_GB",
  "created_at": "2023-07-31T16:39:59.631Z",
  "updated_at": "2023-07-31T16:40:02.558Z",
  "accepted_at": "2023-07-31T16:40:01.526Z",
  "sent_at": "2023-07-31T16:40:01.000Z",
  "delivered_at": "2023-07-31T16:40:02.000Z",
  "read_at": null,
  "errored_at": null,
  "error_code": null,
  "error_description": null,
  "status": "DELIVERED"
}
```


---

# 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 dynamically by asking a question.

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

```
GET https://postman-v1.guides.gov.sg/email-api-guide/programmatic-govsg-api/get-message-by-id-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
