This section goes over the different types of webhook messages that you can receive.
Currently, Connectly only supports WhatsApp messages.

Payload plain text:

{
  "timestamp": "1639083206",
  "sender": {
    "id": "+16315555500",
    "channelType": "whatsapp"
  },
  "recipient": {
    "id": "123456123",
    "channelType": "whatsapp"
  },
  "message": {
    "text": "TEST 11"
  }
}

Payload media:

{
  "timestamp": "1639085537",
  "sender": {
    "id": "+16315555555",
    "channelType": "whatsapp"
  },
  "recipient": {
    "id": "123456123",
    "channelType": "whatsapp"
  },
  "message": {
    "attachments": [
      {
        "type": "video",
        "url": "https://cdn.dev.connectly.ai/asd/asdasdasdasd"
      }
    ]
  }
}

Payload button response

{
  "timestamp": "1639083206",
  "sender": {
    "id": "+16315555500",
    "channelType": "whatsapp"
  },
  "recipient": {
    "id": "123456123",
    "channelType": "whatsapp"
  },
  "message": {
    "text": "TEST 11",
    "isButtonResponse": true
  }
}

Payload delivery status

{
  "topic": "delivery_status",
  "timestamp": "1641513098",
  "sender": {
    "id": "+16044441111",
    "channelType": "whatsapp"
  },
  "recipient": {
    "id": "+16044551234",
    "channelType": "whatsapp"
  },
  "statusUpdate": {
    "id": "01FRRWW2ZAHD9GJ1SWY4VF2GBD",
    "status": "delivered",
    "error": null
  },
  "metadata": {
    "campaign_name": "<YOUR_CAMPAIGN_NAME>"
  }
}

Payload delivery status error

{
  "topic": "delivery_status",
  "timestamp": "1641512856",
  "sender": {
    "id": "+16044441111",
    "channelType": "whatsapp"
  },
  "recipient": {
    "id": "+60445551234",
    "channelType": "whatsapp"
  },
  "statusUpdate": {
    "id": "01FRRWMSAMKNFZAMBPQ65CA7DD",
    "status": "delivery_failed",
    "error": {
      "message": "Message template inputs invalid",
      "type": "ERROR_TYPE_INVALID_REQUEST",
      "code": "ERROR_CODE_MESSAGE_TEMPLATE_INPUT_INVALID",
      "userTitle": "Message template inputs invalid",
      "userMessage": "Pass along the connectly trace id 'cnct_trace_id' to the team for more information.",
      "cntTraceId": "10827968052975079261",
      "details": {
        
      }
    },
    "metadata": {
      "campaign_name": "<YOUR_CAMPAIGN_NAME>"
    }
  }
}