Los webhooks tienen un campo matriz principal que indica qué se está comunicando. Los miembros de la matriz serán objetos JSON con campos detallados relevantes para el webhook.
Los webhooks de la API de administración de WhatsApp Business pueden contener los siguientes objetos:
Parámetro | Descripción |
---|---|
| Este es el objeto al que te suscribiste. Siempre es |
Este objeto contiene los detalles del cambio que activó la llamada a los webhooks. |
entry
Parámetro | Descripción |
---|---|
| ID de las cuentas de WhatsApp Business a las que pertenece este webhook. |
| Hora de la entrada. |
| Cambios que activaron la llamada a los webhooks. Consulta el objeto |
changes
Parámetro | Descripción (haz clic en la flecha de la columna izquierda para ver los valores compatibles) |
---|---|
| Contiene el tipo de notificación que recibes en ese webhook. |
| Contiene detalles de los cambios relacionados con el |
value
Parámetro | Descripción (haz clic en la flecha de la columna izquierda para ver los valores admitidos) |
---|---|
| Se agrega a los webhooks cuando se bloquea una cuenta. Este objeto incluye dos propiedades:
|
| Contiene el límite de nivel actual en el que se encuentra esta cuenta. |
| Se utiliza si se tomó una decisión en relación con las cuentas o los números de teléfono. |
| Incluye el número de teléfono de la cuenta comercial que activó esta notificación. |
| Se usa cuando se produce un evento en una cuenta específica de WhatsApp Business. Haz clic en la flecha de la columna izquierda para ver todas las opciones disponibles. |
| Siempre presente si Indica la cantidad de mensajes de plantilla que puedes enviar con cada número de teléfono del negocio de tus cuentas de WhatsApp Business que tienen un nombre para mostrar aprobado. Consulta Límites de mensajes. |
| Incluye el número máximo de números de teléfono que pueden pertenecer a una empresa. Si field=business_capability_update, un webhook tendrá max_phone_numbers_per_business o max_phone_numbers_per_waba. |
| Incluye el número máximo de números de teléfono que pueden pertenecer a una WABA. Si field=business_capability_update, un webhook incluirá max_phone_numbers_per_business o max_phone_numbers_per_waba. |
| Motivo del rechazo de la plantilla. Valores posibles:
|
| Si se rechaza una solicitud, este campo muestra el motivo del rechazo. |
| Este campo muestra el nombre que se envió para su verificación. |
Enumeración | Se usa para reportar restricciones impuestas a una cuenta de WhatsApp Business cuando esta infringe las políticas de la plataforma de WhatsApp Business. Este campo incluye una lista de los tipos de restricciones y las fechas de vencimiento correspondientes. Los tipos de restricciones posibles son los siguientes:
Las fechas de vencimiento se muestran en formato DateTime. |
| Identificador del usuario que solicitó la inhabilitación del código de verificación en dos pasos, o bien que ya lo inhabilitó o actualizó. |
{ "object": "whatsapp_business_account", "entry": [ { "id": "whatsapp-business-account-id", "time": 1604703141, "changes": [ { "field": "message_template_status_update", "value": { "event": "APPROVED", "message_template_id": 1234567, "message_template_name": "My message template", "message_template_language": "en-US", "reason": null } } ] } ] }
{ "object": "whatsapp_business_account" "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "time": <TIMESTAMP>, "changes": [ { "value": { "event": "REJECTED", "message_template_id": <TEMPLATE_ID>, "message_template_name": "<TEMPLATE_NAME>", "message_template_language": "<LANGUAGE_AND_LOCALE_CODE>", "reason": "<REJECTION_REASON>" }, "field": "message_template_status_update" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "field": "message_template_status_update", "value": { "event": "FLAGGED", "message_template_id": TEMPLATE-ID, "message_template_name": "My message template", "message_template_language": "en-US", "reason": null, "disable_info": { "disable_date": "DATE", } } } ] } ] }
{ "object": "whatsapp_business account", "entry": [ { "id": "10908...", "time": 1661885238, "changes": [ { "value": { "event": "PAUSED", "message_template_id": 6048..., "message_template_name": "welcome", "message_template_language": "en_US", "reason": "NONE", "other_info": { "title": "SECOND_PAUSE", "description": "Your WhatsApp message template has been paused for 6 hours until Aug 31 at 12:47 AM UTC because it continued to have issues." } }, "field": "message_template_status_update" } ] } ], }
{ "object": "whatsapp_business account", "entry": [ { "id": "10310...", "time": TIMESTAMP, "changes": [ { "value": { "event": "PENDING_DELETION", "message_template_id": 1137..., "message_template_name": "<MY_TEMPLATE_NAME>", "message_template_language": "en_US", "reason": "NONE" } }, "field": "message_template_status_update" } ] } ], }
{ "object": "whatsapp_business_account", "entry": [ { "id": "<ID>", "time": <TIME>, "changes": [ { "field": "template_category_update", "value": { "message_template_id": <MESSAGE_TEMPLATE_ID>, "message_template_name": "<MESSAGE_TEMPLATE_NAME>", "message_template_language": "<MESSAGE_TEMPLATE_LANGUAGE", "previous_category": "<PREVIOUS_CATEGORY>", "new_category": "<NEW_CATEGORY>" } } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "time": <TIMESTAMP>, "changes": [ { "field": "message_template_quality_update", "value": { "previous_quality_score": "<PREVIOUS_QUALITY_SCORE>", "new_quality_score": "<NEW_QUALITY_SCORE>", "message_template_id": <TEMPLATE_ID>, "message_template_name": "<TEMPLATE_NAME>", "message_template_language": "<LANGUAGE_AND_LOCALE_CODE>" } } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "waba-id", "time": 1608243053, "changes": [ { "field": "phone_number_name_update", "value": { "display_phone_number": "16505551111", "decision": "APPROVED", "requested_verified_name": "WhatsApp", "rejection_reason": null } } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "waba-id", "time": 1608243062, "changes": [ { "field": "phone_number_quality_update", "value": { "display_phone_number": "16505551111", "event": "FLAGGED", "current_limit": "TIER_10K" } } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "whatsapp-business-account-id", "time": 1604703058, "changes": [ { "field": "account_update", "value": { "phone_number": "16505551111", "event": "VERIFIED_ACCOUNT" } } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "whatsapp-business-account-id", "time": 1604703058, "changes": [ { "field": "account_update", "value": { "event": "DISABLED_UPDATE" "ban_info": { "waba_ban_state": ["SCHEDULE_FOR_DISABLE", "DISABLE", "REINSTATE"], "waba_ban_date": "January 31, 2021" } } } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "value": { "event": "ACCOUNT_VIOLATION", "violation_info": { "violation_type": "VIOLATION_TYPE" } }, "field": "account_update" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "value": { "event": "ACCOUNT_RESTRICTION", "restriction_info": [ {"restriction_type": "RESTRICTED_BIZ_INITIATED_MESSAGING" | "RESTRICTION_ON_ADD_PHONE_NUMBER_ACTION" | "RESTRICTED_CUSTOMER_INITIATED_MESSAGING", "expiration": TIMESTAMP} ] } }, "field": "account_update" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "value": { "event": "DISABLED_UPDATE", "ban_info": { "waba_ban_state": "SCHEDULE_FOR_DISABLE" | "DISABLE" | "REINSTATE", "waba_ban_date": TIMESTAMP } }, "field": "account_update" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "whatsapp-business-account-id", "time": 1604703141, "changes": [ { "field": "account_review_update", "value": { "decision": "APPROVED" } } ] } ] }
{ "field": "account_update", "value": { "phone_number": "PHONE_NUMBER", "event": "ACCOUNT_RESTRICTION", "restriction_info": [ { "restriction_type": "RESTRICTION_ADD_PHONE_NUMBER_ACTION", "expiration": TIMESTAMP }, { "restriction_type": "RESTRICTED_BIZ_INITIATED_MESSAGING", "expiration": TIMESTAMP }, { "restriction_type": "RESTRICTED_CUSTOMER_INITIATED_MESSAGING", "expiration": TIMESTAMP } ] } }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "value": { "phone_number": "15551...", "event": "ACCOUNT_DELETED", }, "field": "account_update" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "value": { "phone_number": "15551...", "event": "PARTNER_REMOVED", }, "field": "account_update" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "time": TIMESTAMP, "changes": [ { "field": "business_capability_update", "value": { "max_daily_conversation_per_phone": NUMBER, "max_phone_numbers_per_business": NUMBER } } ] } ] }
{ "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "time": <UNIX_TIMESTAMP>, "changes": [ { "value": { "entity_type": "BUSINESS", "entity_id": "<BUSINESS_ID>", "alert_severity": "CRITICAL", "alert_status": "ACTIVE", "alert_type": "INCREASED_CAPABILITIES_ELIGIBILITY_FAILED", "alert_description": "Based on your activity, limits cannot be increased for your business <BUSINES_NAME>. Contact support for more information." }, "field": "account_alerts" } ] } ], "object": "whatsapp_business_account" }
{ "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "time": <UNIX_TIMESTAMP>, "changes": [ { "value": { "entity_type": "BUSINESS", "entity_id": "<BUSINESS_ID>", "alert_severity": "WARNING", "alert_status": "ACTIVE", "alert_type": "INCREASED_CAPABILITIES_ELIGIBILITY_DEFERRED", "alert_description": "Limits cannot be increased for your business <BUSINES_NAME>. Use WhatsApp Business platform actively for several days and follow our messaging policies." }, "field": "account_alerts" } ] } ], "object": "whatsapp_business_account" }
{ "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "time": <UNIX_TIMESTAMP>, "changes": [ { "value": { "entity_type": "BUSINESS", "entity_id": "<BUSINESS_ID>", "alert_severity": "WARNING", "alert_status": "ACTIVE", "alert_type": "INCREASED_CAPABILITIES_ELIGIBILITY_NEED_MORE_INFO", "alert_description": "Additional verification is required for your business <BUSINESS_NAME>. Go to Security Center in Meta for Business to complete identity verification. To continue without completing additional verification, your business can use WhatsApp Business platform actively for several days and follow our messaging policies." }, "field": "account_alerts" } ] } ], "object": "whatsapp_business_account" }