Template Status Update#

class pywa.types.templates.TemplateStatusUpdate#

Represents status change of a template.

Triggers:

- A template is approved.
- A template is rejected.
- A template is disabled.
Variables:
  • id – ID of Whatsapp Business Accounts this update belongs to.

  • timestamp – Timestamp of the update (in UTC).

  • new_status (TemplateStatus) – The new status of the template.

  • template_id – The ID of the template.

  • template_name – The name of the template.

  • template_language – The language of the template.

  • category (TemplateCategory | None) – The category of the template.

  • reason (TemplateRejectionReason | None) – The reason the template was rejected (if status is REJECTED).

  • disable_info (DisableInfo | None) – Information about the template disablement (if status is DISABLED).

  • other_info (OtherInfo | None) – Additional information about the template status update (if status is LOCKED or UNLOCKED).

  • rejection_info (RejectionInfo | None) – Information about the template rejection (if status is REJECTED).

  • shared_data – Shared data between handlers.

class pywa.types.templates.TemplateRejectionReason#

The reason the template was rejected.

β€˜Rejection status’ on developers.facebook.com

Variables:
  • PROMOTIONAL – Indicates template contains content that violates our policies.

  • ABUSIVE_CONTENT – Indicates template contains content that violates our policies.

  • INCORRECT_CATEGORY – Indicates the template’s content doesn’t match the category designated at the time of template creation.

  • INVALID_FORMAT – Indicates template has an invalid format.

  • SCAM – Indicates template contains content that violates our policies.

  • TAG_CONTENT_MISMATCH – Indicates the template’s content doesn’t match the category designated at the time of template creation.

  • NONE – Indicates template was paused.

class pywa.types.templates.DisableInfo#

Information about the template disablement.

  • Only present when a template is disabled.

Variables:

disable_date (datetime.datetime) – Timestamp indicating when the template was disabled.

class pywa.types.templates.OtherInfo#

Additional information about the template status update.

  • Only present when a template is locked or unlocked.

Variables:
  • title (str | None) – Title of template pause or unpause event.

  • description (str | None) – String describing why the template was locked or unlocked.

class pywa.types.templates.RejectionInfo#

Information about the template rejection.

Variables:
  • reason (str | None) – Provides a detailed explanation for why the template was rejected. This field describes the specific issue detected in the template content.

  • recommendation (str | None) – Offers actionable guidance on how to modify the template to resolve the rejection reason. This field suggests best practices for editing the template content.