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

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

Estimated reading: 2 minutes 45 views

The Utility Attachment (No Parameter) Template allows businesses to send structured messages containing a PDF attachment for transactional or informational purposes. This template ensures clear communication with users regarding confirmed items or transactions.

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_attachment_no_parameter
  • Language: en_US (English – United States)
  • Category: UTILITY
  • Allow Category Change: true

Components

Header

  • Type: HEADER
  • Format: MEDIA
  • Example: { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" }
  • Purpose: Attaches a PDF file to provide relevant documents or receipts.

Body

  • Type: BODY
  • Text: Item no 12CR007 is confirmed!
  • Purpose: Notifies the user about a confirmed transaction or order.

Footer

  • Type: FOOTER
  • Text: Thank you for choosing us!
  • Purpose: Provides a courteous closing statement.

Buttons

  • Type: BUTTONS
  • Buttons:
    1. Quick Reply
      • Text: Unsubscribe from Promos
      • Purpose: Allows users to opt-out of promotional messages.
    2. URL Button
      • Text: Go to link
      • URL: https://app.pingtochat.com/
      • Purpose: Directs users to an external link for more details.
    3. Phone Number Button
      • Text: Call
      • Phone Number: +91xxxxxxxxxx
      • Purpose: Enables users to directly call customer support.

Sample API Request

{
  "name": "utility_attachment_no_parameter",
  "language": "en_US",
  "category": "UTILITY",
  "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": "Item no 12CR007 is confirmed!"
    },
    {
      "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": "91xxxxxxxxxx"
        }
      ]
    }
  ]
}

Success Response

{
  "id": "xxxxxx",
  "status": "APPROVED",
  "category": "UTILITY"
}

Notes

  • The template is designed for sending confirmation messages with an attached PDF document.
  • The allow_category_change flag is set to true, enabling flexibility in category selection.
  • The Quick Reply button helps users opt out of promotional messages.
  • The URL button allows users to access additional details via an external link.
  • The Phone Number button provides quick access to customer support.

Leave a Comment

Share this Doc

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

Or copy link

CONTENTS