Account Update#
- class pywa.types.account_update.AccountUpdate#
The account_update webhook notifies of changes to a WhatsApp Business Accountβs partner-led business verification submission, its authentication-international rate eligibility, or primary business location, when it is shared with a Solution Partner, policy or terms violations, offboarding, reconnection, or when it is deleted.
- Variables:
id β Business Portfolio ID.
timestamp β Timestamp of the update (in UTC).
event (AccountUpdateEvent) β WhatsApp Business Account (βWABAβ) event.
waba_info (WABAInfo | None) β The WABA information for
AD_ACCOUNT_LINKED,PARTNER_*events, andMM_LITE_TERMS_SIGNEDevent.violation_info (ViolationInfo | None) β Violation information for WABA ban state. Only included for
ACCOUNT_VIOLATIONevent.ban_info (BanInfo | None) β Ban information for WABA ban state. Only included for
DISABLED_UPDATEevent.restriction_info (tuple[RestrictionInfo, ...]) β Restriction info for WABA ban state. Only included for
ACCOUNT_RESTRICTIONevent.disconnection_info (DisconnectionInfo | None) β Disconnection info for WABA ban state. Only included for
PARTNER_REMOVEDevents where the business was using both the WhatsApp Business app and Cloud API.auth_international_rate_eligibility (AuthInternationalRateEligibility | None) β Authentication-international rate eligibility info. Only included for
AUTH_INTL_PRICE_ELIGIBILITY_UPDATEevent.volume_tier_info (VolumeTierInfo | None) β Volume tier info. Only included for
VOLUME_BASED_PRICING_TIER_UPDATEevent.shared_data β Shared data between handlers.
- class pywa.types.account_update.AccountUpdateEvent#
WhatsApp Business Account (βWABAβ) event.
- Variables:
ACCOUNT_DELETED β Indicates WABA was deleted.
ACCOUNT_RESTRICTION β Indicates WABA has been restricted due to policy violations. See
restriction_infofor restriction details.ACCOUNT_VIOLATION β Indicates WABA violated Meta policies or terms.
AD_ACCOUNT_LINKED β Indicates WABA has been onboarded onto Marketing Messages API for WhatsApp through Embedded Signup or Intent API and gives the partner access to its ad accounts.
AUTH_INTL_PRICE_ELIGIBILITY_UPDATE β Indicates WABA is eligible for authentication-international rates.
BUSINESS_PRIMARY_LOCATION_COUNTRY_UPDATE β Indicates WABAβs primary business location has been set.
DISABLED_UPDATE β
Indicates WABA violated Meta policies or terms.
MM_LITE_TERMS_SIGNED β Indicates that the WABA has successfully accepted the MM API for WhatsApp terms of service.
PARTNER_ADDED β Indicates WABA has been shared with a Solution Partner.
PARTNER_APP_INSTALLED β Indicates a business customer granted the app one or more permissions.
PARTNER_APP_UNINSTALLED β Indicates a business customer deauthenticated or uninstalled the app.
PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE β Indicates the WABAβs partner-led business verification submission is approved, rejected, or discarded.
PARTNER_REMOVED β
Indicates WABA has been unshared with a Solution Partner.
VOLUME_BASED_PRICING_TIER_UPDATE β Indicates WABAβs volume-based pricing tier has been updated.
ACCOUNT_OFFBOARDED β Indicates WABA has been offboarded due to a device change or phone number reregistration.
ACCOUNT_RECONNECTED β Indicates WABA has been reconnected after a device change or phone number reregistration.
- class pywa.types.account_update.ViolationInfo#
Violation information for WABA ban state.
- Variables:
type (str) β Violation type. See Violations for a list of possible values.
- class pywa.types.account_update.BanInfo#
BanInfo(state: βWABABanStateβ, date: βdatetime.dateβ)
- class pywa.types.account_update.WABABanState#
WABA ban state.
- Variables:
DISABLE β Indicates WABA is disabled.
REINSTATE β Indicates the WABA has been reinstated.
SCHEDULE_FOR_DISABLE β Indicates the WABA has been scheduled to be disabled.
- class pywa.types.account_update.RestrictionInfo#
Restriction info for WABA ban state.
- Variables:
type (pywa.types.account_update.RestrictionType) β Type of restriction applied to the account.
expiration (datetime.datetime) β Indicates when the restriction expires.
remediation (str | None) β Steps the business can take to remediate the restriction.
- class pywa.types.account_update.RestrictionType#
Type of restriction applied to the account.
- Variables:
RESTRICTED_ADD_PHONE_NUMBER_ACTION β Business cannot add new phone numbers to the account.
RESTRICTED_BIZ_INITIATED_AND_USER_INITIATED_CALLING β Business cannot make or receive calls.
RESTRICTED_BIZ_INITIATED_MESSAGING β Business cannot initiate conversations with customers.
RESTRICTED_BUSINESS_INITIATED_CALLING β Business cannot initiate outbound calls.
RESTRICTED_CUSTOMER_INITIATED_MESSAGING β Business cannot respond to customer-initiated messages.
RESTRICTED_DIRECT_SEND_UTILITY_TEMPLATES β Business cannot send utility templates via Direct Send.
RESTRICTED_USER_INITIATED_CALLING β Business cannot receive inbound calls from users.
RESTRICTED_USER_INITIATED_CALLING_CALL_BUTTON_HIDDEN β Call button is hidden from users due to low pickup rates.
RESTRICTED_UTILITY_TEMPLATES β Business cannot create utility templates.
- class pywa.types.account_update.DisconnectionInfo#
Disconnection info for WABA ban state.
- Variables:
reason (pywa.types.account_update.DisconnectionReason) β Reason for the disconnection.
initiated_by (pywa.types.account_update.DisconnectionInitiatedBy) β Indicates whether the disconnection was initiated by your client or the system.
- class pywa.types.account_update.DisconnectionReason#
Reason for the disconnection.
- Variables:
ACCOUNT_DISCONNECTED β Your clientβs account was disconnected due to enforcement or because your client explicitly deleted their WhatsApp account. Can be initiated by either
USERorSYSTEM.BUSINESS_DOWNGRADE β Your client registered their business phone number with the consumer WhatsApp app.
CHANGE_NUMBER β Your client changed their phone number.
COMPANION_INACTIVITY β A companion device was inactive for approximately 30 days.
PRIMARY_INACTIVITY β The primary device was inactive for approximately 14 days.
USER_RE_REGISTERED β Your client re-registered on a new device.
- class pywa.types.account_update.DisconnectionInitiatedBy#
Indicates whether the disconnection was initiated by your client or the system.
- Variables:
SYSTEM β
The disconnection was system-initiated (for example, due to device inactivity or enforcement).
USER β The disconnection was client-initiated (for example, your client changed their phone number, re-registered on a new device, deleted their WhatsApp account, or registered their business phone number with the consumer WhatsApp app).
- class pywa.types.account_update.WABAInfo#
The WABA information for
AD_ACCOUNT_LINKED,PARTNER_*events, andMM_LITE_TERMS_SIGNEDevent.- Variables:
id (str) β WhatsApp Business Account ID.
owner_business_id (str) β Business portfolio ID.
partner_app_id (str | None) β Partner app ID. Only included for
PARTNER_APP_INSTALLED,PARTNER_APP_UNINSTALLEDevents.solution_id (str | None) β Multi-Partner Solution solution ID. Only included for
PARTNER_APP_INSTALLEDevents, omitted fromPARTNER_APP_UNINSTALLEDevents.solution_partner_business_ids (tuple[str, ...]) β Business portfolio IDs of the Tech Provider (or Tech Partner) and Solution Partner associated with the Multi-Partner Solution. Only included for
PARTNER_APP_INSTALLEDevents, omitted fromPARTNER_APP_UNINSTALLEDevents.ad_account_linked (str | None) β Ad account ID. Only included for
AD_ACCOUNT_LINKEDevent.