The message object

{
  "createdAt": "2024-05-16T10:30:50.904+08:00",
  "updatedAt": "2024-05-16T10:30:50.965+08:00",
  "id": "message_19e23cf4-6f0f-47ed-8856-4623817684b1",
  "recipient": "6599999999",
  "values": {
    "name": "John Doe",
    "fruit": "apple"
  },
  "fullMessage": "<YOUR_FULL_MESSAGE>",
  "latestStatus": "success",
  "templateBodyId": "<YOUR_TEMPALTE_BODY_ID>",
  "campaignId": "<YOUR_CAMPAIGN_ID>",
  "templateBody": {
    "createdAt": "2024-05-16T10:13:15.111+08:00",
    "updatedAt": "2024-05-16T10:13:15.111+08:00",
    "id": "<YOUR_TEMPALTE_BODY_ID>",
    "templateId": "<YOUR_TEMPALTE_ID>",
    "language": "english",
    "body": "{{body}}",
    "creatorId": "user_200972fc-2aa5-42f5-b6fd-4023d96afcd4"
  },
  "batches": [],
  "language": "english",
  "creatorEmail": "campaign_93530a5f-9efd-4d4a-8b27-6a3770b815c2@postman.gov.sg",
  "attempts": [
    {
      "status": "success",
      "createdAt": "2024-05-16T10:57:52.534+08:00"
    },
    {
      "status": "failure",
      "createdAt": "2024-05-16T10:30:50.906+08:00",
      "error": {
        "type": "server_error",
        "code": "server_unknown_error"
      }
    }
  ]
}

Attributes


id string

Message identifier - this can be used to retrieve a single message and its delivery status (Retrieve message). It can also be used to re-send a message in the event where the first attempt failed (Single Send- Retry)


recipient string (Mandatory field)

For messages sent through the sms channel, the recipient will be the mobile phone number of the recipient, prefixed by the country code but without the leading +. For example, when sending to a Singaporean phone number, the value of recipient will be 6599999999

eg. 6591234567 is a recipient string for a Singapore (65) phone number (91234567)


language string (Mandatory field)

This is the language of the message template used to send this message. One of english, chinese, malay, or tamil.


values object (Mandatory field)

The values that were inserted into the message template and form the complete message. The keys within values will vary depending on the campaign’s template parameters.

In the example above, the message template that was used contained two parameters: recipient_name and topic.

Avoid using recipient and language as keywords as they are mandatory fields in the request payload.


fullMessage string

Contains the full message including the SMS Header and Footer.


campaignId string

Campaign identifier - this will inform you which campaign the message is tagged to.


unsupported characters

This is the list of characters that are not supported by Postman and need to be excluded in the values.

  • All emojis

  • The following characters

Excluded characters

|

^

{

}

[

~

]

\

latestStatus string

Possible message statuses and what they mean

StatusWhat it means

created

Postman is aware of your request and has created the necessary records.

However, it has not yet made the request to the relevant messaging service provider to have the message sent.

enqueued

Your message is now in our queue and in the process of getting sent to the relevant messaging service provider.

sending

Your message has been taken out of the queue and in the process of getting sent to the relevant messaging service provider.

sent

Postman has made the request to the relevant messaging service provider to have the message sent.

However, it has not yet received a notification from the provider on the request status.

failure

Message failed to send either due to an error in Postman or from the messaging service. More details in the error message.

Now to 30 May 2024: success

From 31 May 2024: sent_to_telco

The relevant messaging service provider has sent an update to Postman saying that the message has been sent to the recipient's Telco.

Note: This does not mean that your message has been delivered to the recipient.

From 31 May 2024 success

The relevant messaging service provider has sent an update to Postman saying that the message has been delivered by the Telco to the recipient. Note: This status change will be effective from 31 May 2024

success and failure will always be your terminal status, but take note of the changes in the definition of success.

From now till 30 May 2024:

  • success will mean that the message has been sent to the recipient's telco.

From 31 May 2024:

  • sent_to_telco will mean that the message has been sent to the recipient's telco, taking over the previous definition of success.

  • success will now have a new definition, and mean that the message has been sent to the recipient's telco. [terminal status]


attempts array of objects

Shows an object containing the status and createdAt for each attempt. If the status is failure , there will be an additional error object which includes:

  1. type - The error type

    1. delivery_error - Error with the delivery of the message

    2. server_error

  2. code - The error code

    1. recipient_invalid

    2. recipient_unavailable

    3. content_invalid

    4. routing_error

    5. delivery_unknown_error

    6. server_unknown_error

The full description of each error code can be found in the Message delivery errors page

Last updated