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.
Read more at developers.facebook.com.
- 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
LOCKEDorUNLOCKED).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.
- 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.