Twilio

Events

Action Event name
Update the settings for twilio twilioSettings.updated
Emitted when an SMS is sent twilio.sms.sent
Emitted when a WhatsApp message is sent twilio.whatsapp.sent

Payload for Twilio settings updated

{
  "attemptId": "1e368c2e-9c90-44a9-8b25-9ea3c66ffe4b",
  "created": 1719320447,
  "data": {
    "accountId": "11a377ec430c7d4e220001fd",
    "twilio": {
      "accountSid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", // this value will be empty if useDefaultTwilio is true
      "authToken": "1234-56788-123124-cdfg", // this value will be empty if useDefaultTwilio is true
      "sendingNumber": "+12225551234",
      "smsEnabled": true,
      "twilioEnabled": true,
      "useDefaultTwilio": true,
      "waEnabled": false
    }
  },
  "event": "twilioSettings.updated",
  "id": "1f58f8f7-3a36-486d-b3ca-265d5a5bb0c5",
  "livemode": false
}

Payload for SMS and WhatsApp sent

{
  "id": "string",
  "attemptId": "string",
  "livemode": "boolean",
  "created": "int",
  "event": "string",
  "data": {
    "_id": "11a377ec430c7d4e220001fd",
    "apiVersion": "2010-04-01",
    "body": "Hello there!",
    "created":  "Thu, 24 Aug 2023 05:01:45 +0000", //Twilio date
    "sent":  "Thu, 24 Aug 2023 05:01:45 +0000", //Twilio date
    "updated": "Thu, 24 Aug 2023 05:01:45 +0000", //Twilio data
    "direction": "outbound-api",
    "errorCode": "123",
    "errorMessage": "Some error",
    "from": "+14155238886",
    "numMedia": "0",
    "numSegments": "1",
    "price": "0.25",
    "priceUnit": "0.10",
    "messageSeviceId": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "sid": "SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "status": "queued",
    "to": "+15005550006",
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": {
      "value": "2020-11-10T15:02:10Z",
      "offset": 0
    },
    "updatedAt": {
     "value": "2020-11-10T15:02:10Z",
      "offset": 0
    }
  }
}