Prerequisites

To get the most out of this guide, you should have the following:

Authentication

To authenticate inbound requests, you will need an API key. You can obtain your API key by signing up on our website. Once you have your API key, the inbound requests will contain the api key in the header as follows:

PINNACLE-API-KEY: Bearer YOUR_API_KEY

Receiving Inbound RCS Messages

Inbound RCS messages will be sent as a POST request to your webhook URL.

Postback Responses

If the user clicks on a button or quick reply, the request body will contain the message details in JSON format. Here is an example of the request body:

{
    "messageType": "postback",
    "buttonPayload": {
        "title": "Title of button/quick reply that was clicked",
        "payload": "Payload of button/quick reply that was clicked",
        "execute": "The execute metadata associated with the action",
        "sent": "Timestamp (i.e. 2022-01-01T12:00:00Z)",
        "fromNum": "Sender's phone number (i.e. +1234567890)"
    }
}

Messages

If the user sends a message, the request body will contain the message details in JSON format. Here is an example of the request body:

{
    "messageType": "message",
    "messagePayload": {
        "mediaType": "Type of media if any (one of text, image, audio, video, file, or undefined if no match)",
        "media": "URL of media if any",
        "text": "Text of the SMS message",
        "sent": "Timestamp (i.e. 2022-01-01T12:00:00Z)",
        "fromNum": "Sender's phone number (i.e. +1234567890)"
    }
}

Receiving Inbound SMS Messages

Inbound SMS messages will be sent as a POST request to your webhook URL. The body of the request will contain the message details in JSON format. Here is an example of the request body:

{
    "messageType": "message",
    "messagePayload": {
        "mediaType": "Type of media if any (one of text, image, audio, video, file, or undefined if no match)",
        "media": "URL of media if any",
        "text": "Text of the SMS message",
        "sent": "Timestamp (i.e. 2022-01-01T12:00:00Z)",
        "fromNum": "Sender's phone number (i.e. +1234567890)"
    }
}