System events

These are generated by our platform when some event occurs. You can choose to receive these events on your callback URL from the settings in app dashboard. For example, system events are received when;

  • A system event of type template is received when the status of template is updated. For example, a submitted template has been approved or rejected.
  • A system event of type account is received. For example, when the status of the submitted Phone Number or Display Name for a WABA is updated.

The types of system-events

  • Template events
  • Account events

Template events

{
   "app":"jeet20",
   "timestamp":1636986446609,
   "version":2,
   "type":"template-event",
   "payload":{
      "id":"4dacef15-6c04-12db-b393-6190ac567eff",
      "status":"REJECTED/APPROVED/DELETED/DISABLED",
      "elementName":"abcd",
      "languageCode":"en_US",
      "rejectedReason":"INAVLID_FORMAT"
   }
}

The payload object description

KeyDescriptionExample
idIt is the unique identifier for a template on the Gupshup platform. You can find the template ID using the API Get template list4dacef15-6c04-12db-b393-6190ac567eff
statusThe updated status of a template. Possible values are: REJECTED, APPROVED, DELETED, DISABLED.REJECTED
elementNameThe unique name for a template set at during template creation. The elementName of a template is unique within a WABA's namespace.order_update
languageCodeThe language of the template. You can refer to the language code and the associated language here.en_US
rejectedReasonThe reason for template rejection.INVALID_FORMAT

Account events

Account events are received when an event occurs in a specific WABA. For example, when a WhatsApp business policy is violated by a WABA, or if the messaging tier limit of a WABA is updated.

The types of account-events

{
  "app": "jeet20",
  "timestamp": 1636986446609,
  "version": 2,
  "type": "account-event",
  "payload": {
    "type": "review-event",
    "payload": {
      "status": "APPROVED",
      "actionDate": "January 31,2021"
    }
  }
}
{
  "app": "jeet20",
  "timestamp": 1636986446609,
  "version": 2,
  "type": "account-event",
  "payload": {
    "type": "status-event",
    "payload": {
      "status": "ACCOUNT_VIOLATION",
      "violation_type": "GAMBLING"
    }
  }
}
{
   "app":"appname",
   "timestamp":1636986446609,
   "version":2,
   "type":"account-event",
   "phone":"9180xxxxxxxx",
   "payload":{
      "type":"status-event",
      "payload":{
         "status":"ACCOUNT_RESTRICTED",
         "restrictionInfo":[
            {
               "restrictionType":"RESTRICTION_ADD_PHONE_NUMBER_ACTION",
               "expiration":1636986446609
            },
            {
               "restrictionType":"RESTRICTED_BIZ_INITIATED_MESSAGING",
               "expiration":1636986446609
            },
            {
               "restrictionType":"RESTRICTED_CUSTOMER_INITIATED_MESSAGING",
               "expiration":1636986446609
            }
         ]
      }
   }
}
{
  "app": "jeet20",
  "timestamp": 1636986446609,
  "version": 2,
  "type": "account-event",
  "payload": {
    "type": "pndn-event",
    "payload": {
      "status": "approved/rejected",
      "rejectedReason": "INVALID_FORMAT"
    }
  }
}
{
  "app": "jeet20",
  "timestamp": 1636986446609,
  "version": 2,
  "type": "account-event",
  "payload": {
    "type": "tier-event",
    "payload": {
      "event": "onboarding/upgrade/downgrade /unflagged/flagged",
      "oldLimit": "TIER_10K",
      "currentLimit": "TIER_100K"
    }
  }
}
{
   "app":"appname",
   "timestamp":1636986446609,
   "version":2,
   "type":"account-event",
   "payload":{
      "type":"capability-event",
      "payload":{
         "maxDailyConversationPerPhone":100,
         "maxPhoneNumbersPerBusiness":100
      }
   }
}

The payload object description

TypeDescription
review-eventThis event is received when the submitted WABA is approved or rejected.
Possible values: APPROVED, REJECTED.
status-eventThis event is received when the status of the WABA has changed.

Possible values:

ACCOUNT_VIOLATION: The WABA has been flagged due to policy violation, additionally, the reason for the violation is also received.

ACCOUNT_VERIFIED: When an app of type of Embed is updated from Sandbox to Live.

ACCOUNT_RESTRICTED: The WABA has been restricted for its business capabilities due to WhatsApp's policy violations. One or more of following restriction types may be imposed on your WABA:

- RESTRICTION_ADD_PHONE_NUMBER_ACTION - Restriction on adding phone numbers to WABA.
- RESTRICTED_BIZ_INITIATED_MESSAGING - Restriction on sending business-initiated messages.
- RESTRICTED_CUSTOMER_INITIATED_MESSAGING - Restriction on ability to respond to customer-initiated messages.

Along with the type, you will also receive the expiry for the restriction.

Learn more about policy violations.
Learn more about WABA restrictions.

An email will be sent informing you of violations and restrictions received for your WABA.
pndn-eventThis event is received when the status of the submitted Phone number/Display Name is updated.
Possible values:
INVALID_FORMAT, NAME_END_CLIENT_VIOLATION, NAME_FORMAT_UNACCEPTABLE, NAME_NOT_CONSISTENT, NAME_INDIVIDUAL_ISSUE, and NAME_ENDCLIENT_NOTRELATED.
tier-eventThis events notifies you when the quality-related status of a phone number has an update.
Possible values for events: ONBOARDING, UPGRADE, DOWNGRADE, UNFLAGGED, and FLAGGED.
The current tier limit where this account is and the new tier if it has been updated.
Possible values are: TIER_1K, TIER_10K, and TIER_100K.
capability-eventThis event will update you on your WABA's messaging capabilities. It includes:
- maxDailyConversationPerPhone - the maximum number of unique people a phone number can send messages to. See Messaging Limits for more information.
- maxPhoneNumbersPerBusiness - Includes the maximum number of phone numbers that can belong to a business.

What’s Next

In the next chapter of this guide, you'll learn about inbound events type: Message events