Pingtochat Docs

Pingtochat Docs

Did You Know?

Docy turns out that context is a key part of learning.

leafleafleafDocy banner shape 01Docy banner shape 02Man illustrationFlower illustration

Send Basic Message

Estimated reading: 2 minutes 4 views

Overview

This API allows you to send a basic RCS message to an individual recipient. In this case, no media, buttons, or advanced components are included, just a simple text message using a basic template.

API Endpoint

POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message
  • {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com).
  • {{key}}: Replace this with your API key.

HTTP Method

  • POST: Used to send the basic message.

Headers

  • Content-Type: application/json
  • Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication.

Request Payload

This is the JSON structure used to send the basic RCS message with no advanced components:

Example Request Payload:

{
  "messaging_product": "rcs",
  "recipient_type": "individual",
  "to": "9198xxxxxxxx",
  "type": "basic",
  "template": {
    "name": "basicmessgage",
    "components": [
      {
        "message": "Hello! Welcome to P2C."
      }
    ]
  }
}

Field description

Field NameTypeDescriptionExample
messaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"
recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"
toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"
typeStringDefines the type of the template. For a basic template, this should be "basic"."basic"
templateObjectContains the template details for the message. Includes the template name and components (e.g., message body).N/A
template.nameStringThe name of the template, used for identification."basicmessage"
template.componentsArrayAn array containing the components of the message. In this case, it contains a single message.N/A
template.components.messageStringThe actual message content that will be displayed in the message body."Hello! Welcome to P2C."

Success Response

If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message.

Example Response:

{
    "status": "success",
    "message": "Message send successfully",
    "transaction_id": "abcxxxxxxxx"
}

Leave a Comment

Share this Doc

Send Basic Message

Or copy link

CONTENTS