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, and MM_LITE_TERMS_SIGNED event.

  • violation_info (ViolationInfo | None) – Violation information for WABA ban state. Only included for ACCOUNT_VIOLATION event.

  • ban_info (BanInfo | None) – Ban information for WABA ban state. Only included for DISABLED_UPDATE event.

  • restriction_info (tuple[RestrictionInfo, ...]) – Restriction info for WABA ban state. Only included for ACCOUNT_RESTRICTION event.

  • disconnection_info (DisconnectionInfo | None) – Disconnection info for WABA ban state. Only included for PARTNER_REMOVED events 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_UPDATE event.

  • volume_tier_info (VolumeTierInfo | None) – Volume tier info. Only included for VOLUME_BASED_PRICING_TIER_UPDATE event.

  • 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_info for 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:
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:
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 USER or SYSTEM.

  • 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, and MM_LITE_TERMS_SIGNED event.

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_UNINSTALLED events.

  • solution_id (str | None) – Multi-Partner Solution solution ID. Only included for PARTNER_APP_INSTALLED events, omitted from PARTNER_APP_UNINSTALLED events.

  • 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_INSTALLED events, omitted from PARTNER_APP_UNINSTALLED events.

  • ad_account_linked (str | None) – Ad account ID. Only included for AD_ACCOUNT_LINKED event.