{"id":1692,"date":"2025-05-13T21:13:34","date_gmt":"2025-05-13T15:43:34","guid":{"rendered":"https:\/\/www.smsgatewaycenter.com\/blog\/?post_type=docs&#038;p=1692"},"modified":"2025-05-13T21:13:36","modified_gmt":"2025-05-13T15:43:36","password":"","slug":"how-do-i-understand-and-use-the-mo-response-format-when-setting-up-a-webhook-for-whatsapp-business-api-with-smsgatewaycenter","status":"publish","type":"docs","link":"https:\/\/www.smsgatewaycenter.com\/blog\/kb\/how-do-i-understand-and-use-the-mo-response-format-when-setting-up-a-webhook-for-whatsapp-business-api-with-smsgatewaycenter\/","title":{"rendered":"How do I understand and use the MO response format when setting up a webhook for WhatsApp Business API with SMSGatewayCenter?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When you set up a webhook to receive Mobile-Originated (MO) responses from WhatsApp users (e.g., replies to your messages), <strong>SMSGatewayCenter<\/strong> sends a default JSON response. Below is an explanation of the MO response format and how to use it:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding the MO Response Format<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The MO response is a JSON payload that contains details about the incoming message from a customer. Here\u2019s a sample structure and its key components:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>metadata<\/strong>: Contains details about the WhatsApp Business API number.<\/li>\n\n\n\n<li><em>phone_number_id<\/em>: The ID of your WhatsApp Business API number (e.g., &#8220;1111111111&#8221;).<\/li>\n\n\n\n<li><em>display_phone_number<\/em>: The phone number displayed to users (e.g., &#8220;919999999999&#8221;).<\/li>\n\n\n\n<li><strong>messaging_product<\/strong>: Identifies the platform, which will be &#8220;whatsapp&#8221;.<\/li>\n\n\n\n<li><strong>messages<\/strong>: An array containing details of the incoming message.<\/li>\n\n\n\n<li><em>from<\/em>: The customer\u2019s phone number (e.g., &#8220;919152349309&#8221;).<\/li>\n\n\n\n<li><em>id<\/em>: A unique message ID (e.g., &#8220;wamid.HBgMOTE4NDQ3NTA5MTYxFQIAEhggRDREQ0M0RDI2NURFOTc2OUY0QTJFMjU0OEMxNTJEMjQA&#8221;).<\/li>\n\n\n\n<li><em>text<\/em>: The message content.\n<ul class=\"wp-block-list\">\n<li><em>body<\/em>: The text of the message (e.g., &#8220;24&#8221;).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><em>type<\/em>: The message type (e.g., &#8220;text&#8221;).<\/li>\n\n\n\n<li><em>timestamp<\/em>: The UNIX timestamp of when the message was sent (e.g., &#8220;1682397841&#8221;).<\/li>\n\n\n\n<li><strong>contacts<\/strong>: Information about the customer.<\/li>\n\n\n\n<li><em>profile<\/em>: The customer\u2019s profile details.\n<ul class=\"wp-block-list\">\n<li><em>name<\/em>: The customer\u2019s name (e.g., &#8220;CustomerProfileName&#8221;).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><em>wa_id<\/em>: The customer\u2019s WhatsApp ID (e.g., &#8220;911234567890&#8221;).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Setting Up a Webhook with Custom Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Configure Your Webhook<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your SMSGatewayCenter account at https:\/\/www.smsgatewaycenter.com\/.<\/li>\n\n\n\n<li>Navigate to the WhatsApp Business API section in your dashboard and go to the webhook settings.<\/li>\n\n\n\n<li>Enter your webhook URL where the MO responses will be sent.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Add Custom Parameters and Headers<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>While setting up the webhook, you can add custom parameters (e.g., to identify the source) and custom headers (e.g., for authentication) to the webhook request.<\/li>\n\n\n\n<li>For example, you might add a header like <code>Authorization: Bearer your-token<\/code> or a parameter like <code>source=whatsapp<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Handle the MO Response<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once the webhook is set up, <strong>SMSGatewayCenter<\/strong> will send the MO response in the JSON format shown above to your specified URL whenever a customer sends a message.<\/li>\n\n\n\n<li>Use the data in the JSON (e.g., customer\u2019s phone number, message content) to trigger actions in your system, such as replying to the customer or updating your CRM.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Sample MO Response<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s an example of what the MO response JSON looks like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"metadata\": {\n    \"phone_number_id\": \"1111111111\",\n    \"display_phone_number\": \"919999999999\"\n  },\n  \"messaging_product\": \"whatsapp\",\n  \"messages\": &#91;\n    {\n      \"from\": \"919152349309\",\n      \"id\": \"wamid.HBgMOTE4NDQ3NTA5MTYxFQIAEhggRDREQ0M0RDI2NURFOTc2OUY0QTJFMjU0OEMxNTJEMjQA\",\n      \"text\": {\n        \"body\": \"24\"\n      },\n      \"type\": \"text\",\n      \"timestamp\": \"1682397841\"\n    }\n  ],\n  \"contacts\": &#91;\n    {\n      \"profile\": {\n        \"name\": \"CustomerProfileName\"\n      },\n      \"wa_id\": \"911234567890\"\n    }\n  ]\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This feature helps you capture and act on customer replies efficiently. For further assistance with setting up webhooks or handling MO responses, contact our support team at contact @ smsgatewaycenter . com or call +912228657726.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you set up a webhook to receive Mobile-Originated (MO) responses from WhatsApp users (e.g., replies to your messages), SMSGatewayCenter sends a default JSON response. Below is an explanation of the MO response format and how to use it: Understanding the MO Response Format The MO response is a JSON payload that contains details about [&hellip;]<\/p>\n","protected":false},"author":118,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[1327],"doc_tag":[],"class_list":["post-1692","docs","type-docs","status-publish","hentry","doc_category-whatsapp-business-api"],"year_month":"2026-07","word_count":448,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/www.smsgatewaycenter.com\/blog\/author\/admin\/"},"doc_category_info":[{"term_name":"WhatsApp Business API","term_url":"https:\/\/www.smsgatewaycenter.com\/blog\/kb-cat\/whatsapp-business-api\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs\/1692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/users\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/comments?post=1692"}],"version-history":[{"count":0,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/docs\/1692\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/media?parent=1692"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/doc_category?post=1692"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.smsgatewaycenter.com\/blog\/wp-json\/wp\/v2\/doc_tag?post=1692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}