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

Parameter with header-pdf and body and button quick-replay,visit-website, phone number

Estimated reading: 3 minutes 49 views

This document provides detailed information about the Utility Template with Parameter used for communication purposes. This template allows businesses to send structured messages to users for transactional or informational purposes.

Endpoint

http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates
  • {{your_domain}}: Your domain URL where the API is hosted.
  • {{phone_number_id}}: The unique identifier of the phone number used for sending messages.
  • {{key}}: Your API key for authentication.How to create key

Request Headers

  • Authorization: Bearer token for authentication.
  • Content-Type: Should be set to application/json.

Template Information

  • Name: utility_parameter_attachment
  • Language: en_US (English – United States)
  • Category: MARKETING
  • Allow Category Change: Yes

Components

The utility_parameter_attachment template consists of the following components:

1. Header
  • Type: HEADER
  • Format: MEDIA
  • Example: jsonCopyEdit{ "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" }
  • Purpose: Displays a media file (in this case, a PDF file).
2. Body
  • Type: BODY
  • Text: “We are introducing {{1}} new product about {{2}}”
    • Purpose: This component allows dynamic insertion of values through parameters ({{1}} and {{2}}), which will be replaced with actual data at runtime.
  • Example: jsonCopyEdit{ "body_text": [ [ "our", "whatsapp message app" ] ] }
3. Footer
  • Type: FOOTER
  • Text: “Thank you for choosing us!”
    • Purpose: Displays a closing message at the bottom of the template.
4. Buttons
  • Type: BUTTONS
  • Buttons:
    • Type: QUICK_REPLY
      • Text: “Unsubscribe from Promos”
      • Purpose: A quick reply button to allow the recipient to opt out of promotions.
    • Type: URL
    • Type: PHONE_NUMBER
      • Text: “Call”
      • Phone Number: “91xxxxxxxxxx”
      • Purpose: Initiates a call to the given phone number.

Sample Request

{
    "name": "utility_parameter_attachment",
    "language": "en_US",
    "category": "MARKETING",
    "allow_category_change": true,
    "components": [
        {
            "type": "HEADER",
            "format": "MEDIA",
            "example": {
                "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
            }
        },
        {
            "type": "BODY",
            "text": "We are introducing {{1}} new product about {{2}}",
            "example": {
                "body_text": [
                    [
                        "our",
                        "whatsapp message app"
                    ]
                ]
            }
        },
        {
            "type": "FOOTER",
            "text": "Thank you for choosing us!"
        },
        {
            "type": "BUTTONS",
            "buttons": [
                {
                    "type": "QUICK_REPLY",
                    "text": "Unsubscribe from Promos"
                },
                {
                    "type": "url",
                    "text": "Go to link",
                    "url": "https://app.pingtochat.com/"
                },
                {
                    "type": "PHONE_NUMBER",
                    "text": "Call",
                    "phone_number": "919526986676"
                }
            ]
        }
    ]
}

Success Response

  • Status Code: 201 APPROVED
{
    "id": "xxxxxx",
    "status": "APPROVED",
    "category": "MARKETING"
}

Notes

  • The template allows changes to the category, as allow_category_change is set to true.
  • The template is designed for marketing messages, introducing new products and providing a call-to-action with multiple buttons for user interaction (Unsubscribe, Go to Link, and Call).
  • The Quick Reply Button allows recipients to easily opt out of promotional messages.
  • The URL Button redirects users to an external link.
  • The Phone Number Button enables direct calling to customer support.

Leave a Comment

Share this Doc

Parameter with header-pdf and body and button quick-replay,visit-website, phone number

Or copy link

CONTENTS