Skip to main content
Skip table of contents

Receiving Status webhooks

Defining webhooks

Registration of the webhooks is a semi-manual process. All you need to do is provide us with the webhook URL. In response, you will receive a webhook secret that will be used later for verification purposes.

To register a webhook, please contact us at contact@livechat-integrations.com

The webhooks are implemented according to the Standard Webhooks Specification.

Webhooks specs

Headers

webhook-id

the unique webhook identifier 

webhook-signature

the signature of this webhook

webhook-timestamp

integer unix timestamp (seconds since epoch)

Body

The webhook body has following structure:

CODE
{

  "type": "message.status",

  "timestamp": "2024-10-02T09:50:53.124072075Z",

  "data": {

    // status update from meta

  }

}

The data part contains Status object from meta system.

Examples:

Message sent

CODE
{

  "type": "message.status",

  "timestamp": "2024-10-02T09:50:37.917941416Z",

  "data": {

    "id": "wamid.HBgLNDg2MDk2NTU5MTEVAgARGBJGOERCNzY1MTdBQUE4REM3RUMA",

    "status": "sent",

    "timestamp": 1727862637,

    "conversation": {

      "id": "8eaad41770498bb225fa838b44c2531b",

      "origin": {

        "type": "marketing"

      },

      "expiration_timestamp": 1727949060

    },

    "pricing": {

      "billable": true,

      "pricing_model": "CBP",

      "category": "marketing"

    },

    "recipient_id": "48635625362"

  }

}

Message delivered

CODE
{

  "type": "message.status",

  "timestamp": "2024-10-02T09:50:38.917102501Z",

  "data": {

    "id": "wamid.HBgLNDg2MDk2NTU5MTEVAgARGBJGOERCNzY1MTdBQUE4REM3RUMA",

    "status": "delivered",

    "timestamp": 1727862637,

    "conversation": {

      "id": "8eaad41770498bb225fa838b44c2531b",

      "origin": {

        "type": "marketing"

      }

    },

    "pricing": {

      "billable": true,

      "pricing_model": "CBP",

      "category": "marketing"

    },

    "recipient_id": "48635625362"

  }

}

Message read

CODE
{

  "type": "message.status",

  "timestamp": "2024-10-02T09:50:53.124072075Z",

  "data": {

    "id": "wamid.HBgLNDg2MDk2NTU5MTEVAgARGBJGOERCNzY1MTdBQUE4REM3RUMA",

    "status": "read",

    "timestamp": 1727862652,

    "recipient_id": "48635625362"

  }

}

Message failed (wrong number)

CODE
{

  "type": "message.status",

  "timestamp": "2024-10-02T10:13:41.724930177Z",

  "data": {

    "id": "wamid.HBgMNDg2MDk2NTU5MTExFQIAERgSMTQ4MUY0NkZBQzQwQzYxMDNBAA==",

    "status": "failed",

    "timestamp": 1727864020,

    "errors": [

      {

        "code": 131026,

        "title": "Message undeliverable",

        "message": "Message undeliverable",

        "error_data": {

          "details": "Message Undeliverable."

        }

      }

    ],

    "recipient_id": "48635625362"

  }

}

Signature verification

You can use code samples from https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries for signature verification.

More information here:
https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md#verifying-webhook-authenticity

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.