Pingtochat Docs

Pingtochat Docs

Did You Know?

Advanced visual search system powered by Ajax

leafleafleafDocy banner shape 01Docy banner shape 02Man illustrationFlower illustration

Marketting Lite API

Estimated reading: 2 minutes 83 views

Overview

The Marketing Lite API allows businesses to send WhatsApp marketing template messages such as promotions, offers, announcements, and campaign notifications. These messages must use pre-approved templates and comply with WhatsApp business messaging policies

Marketing templates are typically used for:

  • Promotional campaigns
  • Product announcements
  • Offers and discounts
  • Event invitations
  • Business updates

Pre-approved templates ensure non-spam communication and require user opt-in before sending promotional messages.

Endpoint

POST https://app.pingtochat.com/api/v1.0/{phone_number_id}/{api_key}/marketing_messages

HTTP Method

POST

📌 Headers

HeaderValueDescription
Content-Typeapplication/jsonRequest format
AuthorizationBearer <access_token>API authentication

Request Body Example

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "919XXXXXXXXX",
  "type": "template",
  "template": {
    "name": "marketing_template_name",
    "language": {
      "code": "en"
    }
  }
}

Request Parameters

ParameterTypeRequiredDescription
messaging_productstringYesAlways “whatsapp”
recipient_typestringYesUsually “individual”
tostringYesRecipient phone number with country code
typestringYesTemplate message type
template.namestringYesApproved template name
template.language.codestringYesTemplate language

Template Components

1️⃣ Header (Optional)

  • Text / Image / Video / Document
  • Used for attention-grabbing content

2️⃣ Body (Required)

  • Main marketing message content

3️⃣ Footer (Optional)

  • Extra info, disclaimers, contact details

4️⃣ Buttons (Optional)

  • Quick reply
  • Website link
  • Phone call button
  • Copy code button

Success Response Example

{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "91xxxxxxxxxx",
      "wa_id": "91xxxxxxxxxx",
      "status_id": "NTg0MTI="
    }
  ],
  "messages": [
    {
      "id": "phoSwcGtbL",
      "message_status": "accepted"
    }
  ]
}

Common Error Responses

StatusMeaning
400Invalid request
401Authentication failed
403Template not approved
500Server error

Leave a Comment

Share this Doc

Marketting Lite API

Or copy link

CONTENTS