Webhook Events and Payloads

using our Javna CPaaS SMS API, you can receive event notifications related to the status updates of each outbound message sent to your end users, but at first you need to add a webhook URL and subscribe to the messages status updates events you want to receive webhook notifications for.

Adding a Webhook URL and Subscribing to Events

  1. Log in to your Javna CPaaS account, then click on the “Webhooks Settings” button under “Developer Tools”.


  2. On the webhooks page, click “Add Webhook” to add a new webhook URL.

    Add Webhook

  3. Fill in the following details:

    1. Webhook Name: Enter a name for your webhook.
    2. Webhook URL: Add the URL where you will receive notification payloads, which is the endpoint you created earlier.
    3. Event Types: Select the types of events for which you want to receive notifications.

    Select Events

Webhook Event Types Overview

The webhook is triggered when any of the events you’ve registered for occurs. It can be one of the following:

  1. Message Sent To SMS: The message has been successfully sent from the Javna CPaaS platform side to the recipient's mobile network provider.
  2. **Message Delivered:**the message was successfully received by the recipient.
  3. **Message Failed Sending:**the message failed to be sent.
  4. **Message Failed Delivery:**The message failed to be received by the recipient.
  5. **Message Expired:**The message was sent but expired because the delivery report from the operator returned 'EXPIRED' as the final status.
  6. **Message Halted:**The message has been halted for reasons such as the sender name not being defined or approved, or the sender name not matching the destination.
📘

Remember!

  • When you add a webhook for the first time, a POST request will be sent to the webhook URL. If the endpoint did not return a successful (200 OK) HTTP response within 5 seconds, the URL will be considered invalid, in which case an error message will appear, indicating that the URL is invalid. a POST request will also be initiated whenever you edit the webhook.
  • You can add multiple webhooks to the same channel either with the same events or different events based on your preference.