Receiving Messages and User Events

Pinnacle SDKs provide a process() method to securely handle incoming webhook requests:

  • Verifies webhook signatures by comparing your signing secret with the PINNACLE-SIGNING-SECRET in the headers.
  • Parses and validates the request payload.
  • Returns fully typed MessageEvent or UserEvent objects.

Events

  • MESSAGE.RECEIVED: Inbound messages and button clicks from users.
  • MESSAGE.STATUS: Status updates for your sent messages (including FALLBACK_SENT when an RCS message fails and a fallback SMS/MMS is sent instead).
  • USER.TYPING: User started typing.

RCS Fallback Messages

When you send an RCS message with a fallback configured and the RCS message cannot be delivered (e.g., the recipient’s device doesn’t support RCS), the system will automatically send the fallback SMS/MMS message instead.

Webhook routing

Fallback events are delivered to two different webhooks:

  1. RCS agent’s webhook receives a MESSAGE.STATUS event with:

    • status: FALLBACK_SENT
    • fallbackMessage: Details of the SMS/MMS message that was sent instead, including its message ID, type, sender, recipient, text, and any media URLs.
  2. Fallback phone number’s webhook receives MESSAGE.STATUS events related to the fallback message that was sent.