LogoLogo
Become a PartnerStatus Page
  • get started
    • Welcome to 360Dialog
    • Quickstarts
      • Register as a Meta Tech Provider
      • Add a WhatsApp Number
      • Set up Integrated Onboarding
      • Create a Message Template
      • Send a Message
      • (temp title) Getting started as a partner
    • Pricing & Billing
      • Payment Methods for BR: Pix & Boleto
      • Month Closing Invoice (MCI)
    • Get API Access
    • Tech Provider Program
      • Understanding the Meta Tech Provider Program
      • Becoming a Meta Tech Provider: A Step-by-Step Guide
  • MM Lite Beta Program
    • Onboarding
    • Sending Messages
    • Expected Errors & Programming Languages
    • MM Lite Sandbox Testing
      • Sending Messages using MM Lite Sandbox
      • Expected Erros & Programming Languages
  • Partner & Account Management
    • Solutions for Partners
      • Benefits for Partners
      • Partner Hub
      • WABA Management
    • Account Setup & Management
      • Prerequisites and best practices for account creation
      • Account Structure
      • Account Creation
  • Integrations & API Development
    • Webhook Events & Setup
      • Webhook Events (Partner & Messaging API)
      • Webhook Configuration & Management
    • Integration Best Practices
      • Architecture and Security
      • Best Practices for Designing Integrations
        • Design a Stable Webhook Receiving Endpoint
      • Sizing Your Environment Based on Expected Throughput
      • Design a Resilient Message Sending Service
      • Integrated Onboarding
        • Basic Integrated Onboarding
        • Custom Integrated Onboarding
        • Host Your Own Embedded Signup
      • API Key Authentication for the Partner API
  • API Reference
    • Messaging API
    • Messaging Health Status
    • Sandbox (Test API Key)
    • Differences Between Cloud API and On-Premise API for Partners
      • [will be deprecated] Messaging with On-Premise API
    • Partner API
  • WABA Management
    • Managing WABA Accounts
      • Using the Partner Hub to manage Clients and Channels
      • Using the Partner API to manage Clients and Channels
      • Partner Permission to Generate API Key
      • Checking Usage & Statistics
    • Phone Number & Hosting
      • Migrating a Phone Number
        • Migrate number from Meta or alternate BSP to 360Dialog
        • Migrate a phone number to a new WABA
        • Migrate a phone number to a new WABA to change messaging Currency
      • WhatsApp Coexistence
        • Coexistence Onboarding
        • Coexistence Webhooks
      • Hosting type Change (On-premise API to Cloud API)
    • WABA Profile & Compliance
      • Display Name Guidelines
      • WABA Profile Info
      • WABA Policy Enforcement
      • Business Account Verification
    • Partner change (between 360Dialog Partners)
    • WhatsApp Flows
    • Accelerated Onboarding
    • Business Account Verification
  • Messaging
    • Sending & Receiving Messages
      • Conversations
      • Receiving messages
      • Before sending a message
    • Message Types
      • Conversational Components
      • Checklist for Message Broadcasts and Campaigns
      • Text messages
      • Interactive messages
        • Single and Multi Product Messages
        • Location Request Messages
        • Address Messages (India and Singapore only)
      • Contacts & Location Messages
    • Template Messages
      • Template Library
      • Template Elements
      • Sending Template Messages
      • Authentication Templates
        • Zero-Tap Authentication Templates
        • One-Tap Autofill Authentication Templates
        • Copy Code Authentication Templates
      • Catalog Templates
      • Product Card Carousel Templates
      • Single-Product Message Templates
      • Coupon Code Templates
      • Limited-Time Offer Templates
      • Multi-Product Templates
    • Media Messages
      • Upload, retrieve or delete media
    • Messaging Health & Troubleshooting
      • Messaging Limits & Quality Rating
      • Errors While Messaging
      • Messages statuses
  • Commerce & Payments
    • Payments (India Only)
      • Receive WhatsApp Payments via Payments Gateway
      • Receive WhatsApp Payments via Payment Links
      • Order Details Template Message
    • Payments (Singapore Only)
      • Receive WhatsApp Payments via Stripe
    • Products and Catalogs
      • India Businesses: Compliance for Commerce
  • Support & Updates
    • Help & Troubleshooting
      • FAQ
      • Error Code Reference
      • User Support Documentation
        • Tutorials
          • Page How to Troubleshoot Login Issues in the 360dialog Hub
          • How to Report an Issue
          • How to Contact Support
        • How-To Guides
          • Raise a support request
          • Requesting a Status Update for Business Verification
        • Reference
          • Troubleshooting Embedded Signup Issues
          • Commerce Policy Checks for WhatsApp API Access
          • Support Availability & SLAs
          • Incident Issue Prioritization
          • Case Types Table
        • Explanation
          • Why Business Verification Takes Time
          • Why Some Issues Are Not Emergencies
          • Understanding the Support Process
      • Support with Meta
    • Imprint & Data Privacy
    • Product Updates & News
      • How to ensure your Template Messages will be received
      • Integrated Onboarding new look and Campaigns Best Practices
Powered by GitBook
On this page
  • Send a text message
  • Formatting in Text Messages
  • Sending URLs in Text Messages
  • Replies
  • [will be deprecated] If the WABA is registered in On-premise API
  • Send a text message

Was this helpful?

  1. Messaging
  2. Message Types

Text messages

PreviousChecklist for Message Broadcasts and CampaignsNextInteractive messages

Last updated 11 months ago

Was this helpful?

You can only send a text message up until 24 hours after receiving a message from the user. If you have not received a message from the user within this time, you will need to start a new conversation by

To send text messages, specify text in the type field. A text message can be a maximum of 4096 characters long.

Send a text message

POST https://waba-v2.360dialog.io/messages

To send a message, use the request URL and the following body parameters.

Request example

{

"messaging_product": "whatsapp",

"recipient_type": "individual",

"to": "PHONE_NUMBER",

"type": "text",

"text": {

"body": "Hello, dear customer!"

}

}

Request Body

Name
Type
Description

recipient_type

string

individual

to

string

wa_idof the contact you want to message

type

string

text

text

object

contains body field

messaging_product

string

Required only for Cloud API. Messaging service used for the request. Use "whatsapp".

context

object

An object containing the ID of a previous message you are replying to. For example:

{"message_id":"MESSAGE_ID"}

Cloud API only.

A successful response includes a messages object with an ID for the newly created message.

{
    "messaging_product": "whatsapp",
    "contacts": [
        {
            "input": "16505076520",
            "wa_id": "16505076520"
        }
    ],
    "messages": [
        {
            "id": "wamid.HBgLMTY1MDUwNzY1MjAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3RTcA"
        }
    ]
}

Formatting in Text Messages

WhatsApp allows some formatting in messages. To format all or part of a message, use these formatting symbols:

Formatting
Symbol
Example

Bold

Asterisk (*)

Your total is *$10.50*.

Italics

Underscore (_)

Welcome to _WhatsApp_!

Strike-through

Tilde (~)

This is ~better~ best!

Code

Three backticks (```)

```print 'Hello World';```

Sending URLs in Text Messages

By default, the mobile WhatsApp application recognizes URLs and makes them clickable. To include a URL preview, include "preview_url": true and make sure the URL begins with http:// or https://. A hostname is required, IP addresses are not matched.

When sending preview-url with Cloud API hosting, the preview-url should be inside the text object.

Example:

    "text":  {// the text object
        "preview_url": true,
        "body": You have to check out this amazing messaging service https://www.whatsapp.com/"
    }

The majority of the time when you send a URL, whether with a preview or not, the receiver of the message will see a URL that they can click on.

URL previews are only rendered after one of the following has happened:

  1. The business has sent a message template to the user.

  2. The user initiates a conversation with a "click to chat" link.

  3. The user adds the business phone number to their address book and initiates a conversation.

If the end user did not initiate the conversation with you - you must use a Template message instead.

[will be deprecated] If the WABA is registered in On-premise API

To use preview-url with the 360dialog On-Premise hosting, it must be sent as a top-level object:

Example:

{
    "preview_url": true,
    "to": "whatsapp-id",
    "text": {
        "body": "You have to check out this amazing messaging service https://www.whatsapp.com/"
     }
 

Replies

Recipients will not see a contextual bubble if:

  • replying with a template message ("type":"template")

  • replying with an image, video, PTT, or audio, and the recipient is on KaiOS

These are known bugs which Meta is addressing. We will keep you updated on this matter.

Sample request:

POST https://waba-v2.360dialog.io/messages
{
   "messaging_product": "whatsapp",
   "context": {
     "message_id": "MESSAGE_ID"
   },
   "to": "<phone number> or <wa_id>",
   "type": "text",
   "text": {
     "preview_url": False,
     "body": "your-text-message-content"
   }
 }

A successful response includes an object with an identifier prefixed with wamid. Use the ID listed after wamid to track your message status.

Note: if the previous message is more than 30 days old or doesn't correspond to any message in the conversation, the message will be sent normally instead of as a reply.

Sample response:

{
  "messaging_product": "whatsapp",
  "contacts": [{
    "input": "PHONE_NUMBER",
    "wa_id": "WHATSAPP_ID",
  }]
  "messages": [{
    "id": "wamid.ID",
  }]
}

[will be deprecated] If the WABA is registered in On-premise API

As announced in November 2023, Meta is transitioning to a fully Cloud-hosted WhatsApp Business Platform and will stop supporting On-Premise API in October 2025. Starting from On-Premise client v2.53, all new feature updates will be exclusively delivered to Cloud API. While the On-Premise API client will receive quarterly releases, they will focus solely on bug fixes and security patches.

Send a text message

POST https://waba.360dialog.io/v1/messages

To send a message, use the request URL and the following body parameters.

Request example

{

"recipient_type": "individual",

"to": "wa_id",

"type": "text",

"text": {

"body": "Hello, dear customer!"

}

}

Request Body

Name
Type
Description

recipient_type

string

individual

to*

string

wa_id of the contact you want to message

type

string

text

text

object

contains body field

A successful response includes a messages object with an ID for the newly created message.

{
    "messages": [
        {
            "id": "gBGHSRUUIXKJTwIJVQgXRR0rdXiv"
        }
    ],
    "meta": {
        "api_status": "stable",
        "version": "2.31.5"
    }
}

Required if any message in the conversation.

You can send any message as a reply to a previous message in a conversation by including the previous message's ID in the object. The recipient will receive the new message along with a contextual bubble that displays the previous message's content.

sending a Template message.
See differences between On-premise API and Cloud API
Learn how to change hosting type of registered numbers
context
replying to
Enable Cloud API in your Partner Hub to be able to register Cloud API numbers