Postman Guide
Go to Postman v1
  • πŸ₯³About Postman v1 (Postman Legacy)
  • Campaign Guide - General
    • πŸš€How to send a campaign?
      • ☝️Before You Start
        • Demo Mode
  • Campaign Guide - Email
    • πŸ“§Email Campaigns - Basics
      • How do I send an email campaign?
      • Scheduled Sending
      • Bounced Emails and Halted Campaigns
      • Email Statistics
      • Formatting your Message Template
      • Variable Fields
      • Unique URL Link per Recipient
      • Pasting Content from Microsoft Word
      • Manage your Unsubscriptions
      • Understanding Unsubscriptions
    • πŸ”Sending Password-Protected Emails
      • Tutorial
      • Template Editor
  • Campaign Guide - SMS
    • πŸ“²SMS Campaigns - Basics
      • Before Starting Out
      • Summary of Costs
    • πŸͺœSMS Onboarding Overview
      • Step 1: Sender ID Registration
      • Step 2: Sign up for a Twilio account
      • Step 3: Set up your Twilio account
      • Step 4: Configure Your Twilio Account
        • What if I need to buy a phone number?
      • Step 5: Send a Test Message on Twilio
      • Step 6: Fill in your Twilio credentials in Postman!
        • How do I send a campaign with my saved SMS credentials?
    • πŸ€”What else do I need to know about sending SMSes?
      • More about Sender ID registration
      • Can I see the send status of my campaign?
      • How can I configure my SMS send rate?
      • Sending an SMS to a Foreign Number
      • SMS Best Practices
      • Useful Twilio Links
  • Campaign Guide - Telegram
    • πŸ€–Telegram Campaigns - Basics
      • How do I set up Telegram to send my campaigns?
      • Add Telegram Bot Token in Postman
      • Instructions for Recipient Onboarding
      • Use the Bot in the Campaign
      • Telegram Formatting
      • Telegram Bot Statistics
  • Email API Guide
    • πŸ“–Overview
      • IM8 Policies
      • Connecting your Intranet Application
      • API Response Formats
    • πŸ—οΈEmail API Key Management
      • Bearer Authentication
      • Generate your email API Key
      • Rotate your email API Key
    • πŸ“¨Programmatic Email API
      • Getting Started
      • Comparison with AMR
      • SG-Mail Whitelisting
      • Custom From Address
      • Tracking Email Status
      • Send Email API
        • From Name and From Address
        • CC and BCC
        • Recipient Blacklist
        • Email Tagging and Classification
        • Email Body
          • Embedding Images
            • Linked Images
            • Content-ID Images
        • Attachments
        • Rate Limit
      • Get Email by ID API
      • List Emails API
    • πŸ“¨Programmatic GovSG WhatsApp API
      • Getting Started
      • Tracking Message Status
      • Get Available Templates API
      • Send Message API
      • Get Message by ID API
      • List Messages API
    • πŸŽ“Frequently Asked Questions
  • FAQ
    • πŸ“ΆService Status
    • For Recipients
      • Check Email Authenticity
    • For Senders
      • Messaging Channel Comparison
      • Cost Breakdown
  • Legal
    • Terms & Conditions
    • Privacy Policy
  • Contact Us
  • GitHub
Powered by GitBook
On this page

Was this helpful?

  1. Email API Guide
  2. Programmatic GovSG WhatsApp API

Send Message API

PreviousGet Available Templates APINextGet Message by ID API

Last updated 9 months ago

Was this helpful?

Updated 25 October 2023 We have stopped onboarding new agencies to the Gov.sg WhatsApp channel

Overview

This endpoints accept a request body that contains information about the Gov.sg WhatsApp message to be sent. Each successful request to this endpoint will send out a single Gov.sg WhatsApp message.

Request Body

  1. recipient: Mobile phone number of the recipient without special formatting (only contains numerical characters and prefixed with plus sign if country code is included).

    Notes:

    • Country code will need to be provided for non-SG mobile numbers.

    • If country code is not provided, the phone number will be defaulted to be an SG number.

  2. params: A key-value object with keys being the parameter names (wrapped in double curly braces in the template body) and corresponding string values to fill in the template body.

  3. language_code (optional): The language code that can be retrieved from the multilingual_support field of the template

API Response

Example Response

{
  "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:01.526Z",
  "accepted_at": "2023-07-31T16:40:01.526Z",
  "sent_at": null,
  "delivered_at": null,
  "read_at": null,
  "errored_at": null,
  "error_code": null,
  "error_description": null,
  "status": "ACCEPTED"
}

For message status, we have 6 different states that a message can be in:

  • UNSENT - Initial state of a newly created transactional Gov.sg message (this status is not returned in the course of a successful request to send a GovSG message)

  • ACCEPTED - Message has been accepted by our service provider (this status is returned in the course of a successful request to send a Gov.sg message)

  • SENT - The send request was successfully forwarded to our service provider and our service provider will attempt to deliver the message to the recipient’s phone number (API user can check this and all subsequent statuses via the /transactional/govSG/{messageId} endpoint)

  • DELIVERED - The service provider has successfully delivered the message to the recipient's phone number

  • READ - The recipient has received the message and viewed it

  • ERROR - An error happened when the service provider is trying to deliver the message

template_id: ID of the template that suits your need (can be retrieved from )

For general information about our API response formats, .

πŸ“¨
GET templates endpoint
see here