Pingtochat Docs

Pingtochat Docs

Did You Know?

Advanced visual search system powered by Ajax

leafleafleafDocy banner shape 01Docy banner shape 02Man illustrationFlower illustration

No parameter with header-text and body and footer dynamic url to static button quick-replay,phone-number,copy-code

Estimated reading: 3 minutes 65 views

Create a Template

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.

Request Body

{
    "name": "edit_x",
    "language": "en_US",
    "category": "MARKETING",
    "allow_category_change": true,
    "components": [
        {
            "type": "HEADER",
            "format": "TEXT",
            "text": "Our summer sale is on!"
        },
        {
            "type": "BODY",
            "text": "Shop now  and use code CR7000 to get more offers"
        },
        {
            "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://developers.pingtochat.com/{{1}}",
                    "example": [
                        "?docs=pingtochat/wp"
                    ]
                },
                {
                "type": "PHONE_NUMBER",
                "text": "Call",
                "phone_number": "91xxxxxxxxxx"
                },
                {
                "type": "copy_code",
                "example": "WRETTT"
                }
            ]
        }
    ]
}

Components Breakdown

HEADER

  • Type: “HEADER”
  • Format: “TEXT”
  • Text: “Our summer sale is on!”

BODY

  • Type: “BODY”
  • Text: “Shop now and use code CR7000 to get more offers”

FOOTER

  • Type: “FOOTER”
  • Text: “Thank you for choosing us!”

BUTTONS

  • Quick Reply Button: “Unsubscribe from Promos”
  • URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”)
  • Phone Number Button: “Call” (Phone Number: “91xxxxxxxxxx”)
  • Copy Code Button: “WRETTT”

Success Response

Status Code: 201 APPROVED

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

Edit an Existing Template

Endpoint

http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update

Request Body

{
    "components": [
        {
            "type": "HEADER",
            "format": "TEXT",
            "text": "Our summer sale is on in Urwallet!"
        },
        {
            "type": "BODY",
            "text": "We are introducing our new product in Urwallet!"
        },
        {
            "type": "FOOTER",
            "text": "Thank you for choosing Urwallet!"
        },
        {
            "type": "BUTTONS",
            "buttons": [
                {
                    "type": "QUICK_REPLY",
                    "text": "Unsubscribe Urwallet"
                },
                {
                    "type": "url",
                    "text": "Go to link",
                    "url": "https://app.pingtochat.com"
                },
                {
                "type": "PHONE_NUMBER",
                "text": "Call",
                "phone_number": "911234567890"
                },
                {
                "type": "copy_code",
                "example": "WRETTT"
                }
            ]
        }
    ]
}

Components Breakdown

HEADER – Text: “Our summer sale is on in Urwallet!”

BODY – Text: “We are introducing our new product in Urwallet!”

FOOTER – Text: “Thank you for choosing Urwallet!”

BUTTONS

  • Quick Reply Button – “Unsubscribe Urwallet”
  • URL Button – “Go to link” (URL: “https://app.pingtochat.com“)
  • Phone Number Button – “Call” (Phone Number: “911234567890”)
  • Copy Code Button – “WRETTT”

Response

{
    "success": true,
    "id": "xxxxxx",
    "name": "edit_x",
    "category": "marketing"
}

Notes

  • The {{your_domain}} should be replaced with the actual domain.
  • The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values.
  • Ensure that the request body is formatted correctly as JSON.
  • Only authorized users with a valid key can create or update templates.
  • Categories may be restricted based on platform policies.

Leave a Comment

Share this Doc

No parameter with header-text and body and footer dynamic url to static button quick-replay,phone-number,copy-code

Or copy link

CONTENTS