### cURL Request Example Source: https://cpaasdocs.netcorecloud.com/docs/netcore-google-rcs-api-documentation/330p9faa13x80-preview-template-api This cURL command demonstrates how to make a GET request to the Preview Template API. Ensure to fill in the required Content-Type and api_key headers. ```shell curl --request GET \ --url https://soipapi.netcorecloud.com/rcs/template/preview \ --header 'Content-Type: ' \ --header 'api_key: ' \ --header 'nc_bot_id: ' ``` -------------------------------- ### GET Method Example for SMS Webhooks Source: https://cpaasdocs.netcorecloud.com/docs/netcore-sms/kqkxal037yhn5-sms-webhooks This example shows the structure of a GET request sent to a webhook URL for SMS delivery status updates. It includes common parameters like status, mobile number, feed ID, request ID, and delivery date. ```HTTP GET /sms/netcore/delivery_status?status=Invalidsubscriber&mobile=918754215121&feedid=388304&reqid=63341253481&delv_date=2025-03-03+09%3A01%3A18 Host: callback.okcredit.in ``` -------------------------------- ### Response Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/m297z4a86wwk9-conversion-api-capi An example response structure, potentially indicating user profile information after an API interaction. ```json { "id": 142, "firstName": "Alice", "lastName": "Smith", "email": "alice.smith@gmail.com", "dateOfBirth": "1997-10-31", "emailVerified": true, "signUpDate": "2019-08-24" } ``` -------------------------------- ### Order Details Template Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/blb51d02fxz20-order-details-template This example demonstrates how to structure a message using the Order Details Template, including order items, payment settings, and total amount. ```APIDOC ## POST /send ### Description Sends an order details template message via WhatsApp. ### Method POST ### Endpoint /send ### Parameters #### Header Parameters - **Authorization** (string) - Required - **Content-Type** (string) - Required #### Request Body - **message** (array) - Required - An array of message objects to be sent. - **recipient_whatsapp** (string) - Required - The WhatsApp number of the recipient. - **message_type** (string) - Required - The type of message, e.g., "interactive". - **source** (string) - Required - The source identifier for the message. - **type_media_template** (object) - Optional - Defines the media template for the message. - **type** (string) - Required - The type of media, e.g., "image". - **media_id** (string) - Required - The ID of the media. - **type_template** (array) - Required - Defines the text template for the message. - **name** (string) - Required - The name of the template. - **attributes** (array) - Required - An array of attributes for the template. - **language** (object) - Required - Language settings for the template. - **locale** (string) - Required - The locale of the language. - **policy** (string) - Required - The language policy. - **type_order_detail_template** (object) - Required - Defines the order details for the message. - **currency** (string) - Required - The currency of the order. - **order** (object) - Required - Details of the order. - **items** (array) - Required - An array of items in the order. - **name** (string) - Required - The name of the item. - **quantity** (string) - Required - The quantity of the item. - **amount** (object) - Required - The amount for the item. - **value** (string) - Required - The value of the amount. - **sale_amount** (object) - Optional - The sale amount for the item. - **value** (string) - Required - The value of the sale amount. - **importer_address** (object) - Optional - The importer's address. - **city** (string) - Required - The city of the address. - **postal_code** (string) - Required - The postal code of the address. - **subtotal** (object) - Required - The subtotal of the order. - **value** (string) - Required - The value of the subtotal. - **shipping** (object) - Optional - The shipping cost for the order. - **value** (string) - Required - The value of the shipping cost. - **status** (string) - Required - The status of the order. - **payment_settings** (array) - Required - Payment settings for the order. - **type** (string) - Required - The type of payment setting, e.g., "payment_gateway". - **payment_gateway** (object) - Required - Details of the payment gateway. - **type** (string) - Required - The type of payment gateway, e.g., "payu". - **configuration_name** (string) - Required - The name of the payment gateway configuration. - **total_amount** (object) - Required - The total amount of the order. - **value** (string) - Required - The value of the total amount. ### Request Example ```json { "message": [ { "recipient_whatsapp": "919123456789", "message_type": "interactive", "source": "ravi", "type_media_template": { "type": "image", "media_id": "MEDIA123456789" }, "type_template": [ { "name": "order_summary_notification", "attributes": [ "Your order has been created successfully!" ], "language": { "locale": "en", "policy": "deterministic" } } ], "type_order_detail_template": { "currency": "INR", "order": { "items": [ { "name": "Kay Beauty Matte Drama Long Stay Lipstick", "quantity": "1", "amount": { "value": "100" }, "sale_amount": { "value": "90" }, "importer_address": { "city": "East Delhi", "postal_code": "110093" } }, { "name": "NIVEA Body Lotion, Extra Whitening Cell Repair", "quantity": "1", "amount": { "value": "100" }, "sale_amount": { "value": "95" }, "importer_address": { "city": "East Delhi", "postal_code": "110093" } } ], "subtotal": { "value": "200" }, "shipping": { "value": "100" }, "status": "pending" }, "payment_settings": [ { "type": "payment_gateway", "payment_gateway": { "type": "payu", "configuration_name": "Test_udayan" } } ], "total_amount": { "value": "400" } } } ] } ``` ``` -------------------------------- ### Fetch Flow List API Request Example (cURL) Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/wdg9xjisziypl-fetch-flow-list-api This cURL command demonstrates how to make a GET request to the Fetch Flow List API endpoint. Ensure you replace the placeholder Authorization and Content-Type headers with your actual credentials. ```shell curl --request GET \ --url https://cpaaswa.netcorecloud.net/api/v3/metainfo/flow/listv3/metainfo/flow/list \ --header 'Authorization: ' \ --header 'Content-Type: ' ``` -------------------------------- ### Publish Flow API Request Example (cURL) Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/3d06yujzm9cns-publish-flow Example of how to publish a WhatsApp flow using cURL. Ensure you replace the placeholder with your actual bearer token. ```shell curl --request GET \ --url https://cpaaswa.netcorecloud.net/api/v3/metainfo/flow/publish/v3/metainfo/ \ --header 'Authorization: ' ``` -------------------------------- ### WhatsApp API Media Template Creation Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/7dfy54q9nioru-create-media-template This JSON payload demonstrates the structure for creating a media template with a document header, body text, footer, and various button types. It includes examples for dynamic content in the body and different button functionalities. ```json { "meta_payload": { "name": "seasonal_promotion_text_only_document2", "language": "en", "category": "MARKETING", "components": [ { "type": "HEADER", "format": "document", "example": { "header_handle": [ "4::YXBwbGljYXRpb24vcGRm:ARbEvuurvBfUBIKyfIkgtS2VGs7M107ZxQvJ1mkAEwNFdVyy0e5-EhHutXVx8nK5LQXqzoV_ln4pCcIxYdtL3B-iuCLgVNgRTPoLPDAq9ypHjQ:e:1748009179:878254782770621:100057778901584:ARZ4ZtHbpEYJmWoobQI" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Stop promotions" }, { "type": "QUICK_REPLY", "text": "Enjoy" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "917009508776" }, { "type": "URL", "text": "No tracking button", "url": "https://www.examplesite.com/shop?promo={{1}}", "example": [ "summer2023" ] }, { "type": "URL", "text": "Tracking button", "url": "https://www.examplesite.com/shop?promo={{1}}", "example": [ "https://www.examplesite.com/shop?promo=123" ] }, { "type": "COPY_CODE", "text": "Copy offer code", "example": "SAVE30" } ] } ] }, "nc_payload": { "source": "cee", "stop_at_cc": true, "thumbnail_url": "https://aws.s3.com/ceebucket/save_template.jpg", "usecase": "", "template_save_mode": "", "template_type": "media", "template_header": 4, "header_example_value": "https://cpaas-media-us.s3.amazonaws.com/whatsapp-media/dummy_20250519193617_1747663577950.pdf", "header_value": "https://www.google.com/dummy.pdf", "doc_file_name": "dummy.pdf", "button_value": [ { "button": "MarketingOptOut", "check_box": true }, { "button": "Custom" }, { "button": "CallPhoneNumber", "number": "+44-United Kingdom_7009508776" }, { "url_type": "withoutTracking", "button": "VisitWebsite" }, { "url": "https://qa.nctrckg.com", "url_type": "withTracking", "button": "VisitWebsite", "webUrl": "https://abcd.com" }, { "button": "CopyOfferCode" } ] } } ``` -------------------------------- ### Payment Status Response Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/avsugrkgm1ufn-payment-status This is an example of a successful response when retrieving the payment status. It includes details like reference ID, payment configuration ID, status, amount, and timestamp. ```json { "status": "success", "message": "Payment status retrieved successfully.", "data": { "reference_id": "901003", "payment_config_id": "vishal_test_10_10", "status": "completed", "amount": { "currency": "INR", "value": "100" }, "timestamp": "2024-11-19T10:00:00Z" } } ``` -------------------------------- ### Upload Media File Request Body Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/k4e6ided0079d-upload-media-file This example shows the structure of the JSON request body for uploading a media file. The 'file' parameter should contain the path to the file, prefixed with 'file=@'. ```json [ { "file": "file=@\"/C:/Users/Downloads/Sunflower-Image.jpg" } ] ``` -------------------------------- ### Send SPM Message API Request Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/tohpns2qdo3ae-spm-message Example cURL command to send a Single Product Message using the Netcore WhatsApp API. Ensure to replace placeholder values with actual data. ```curl curl --request POST \ --url https://cpaaswa.netcorecloud.net/api/v2/message/nc \ --header 'Authorization: ' \ --header 'Content-Type: application/json' \ --data '{ \ "message": [ \ { \ "recipient_whatsapp": "string", \ "message_type": "string", \ "recipient_type": "string", \ "source": "string", \ "x-apiheader": "string", \ "type_interactive": [ \ { \ "type": "string", \ "footer": "string", \ "body": "string", \ "catalog_id": "string", \ "product_retailer_id": "string" \ } \ ] \ } \ ] \ }' ``` -------------------------------- ### Refund API Request Body Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/z12jksbj8no90-refund-api This is an example of the JSON body required to initiate a refund. Ensure all required fields like reference_id, speed, payment_config_id, and amount details are correctly provided. ```json { "reference_id": "100", "speed": "normal", "payment_config_id": "vishal_test_10_10", "amount": { "currency": "INR", "value": "100", "offset": "100" } } ``` -------------------------------- ### Send Email API v6 cURL Request Example Source: https://cpaasdocs.netcorecloud.com/docs/email-api-v6/khb3hkw3xo50r-send-email Demonstrates how to send an email using a cURL command. This example includes the necessary headers and a sample JSON payload for the request body. ```shell curl --request POST \ --url https://api.pepipost.com/v6/mail/send \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ \ "personalizations": [ \ { \ "to": [ \ { \ "email": "string", \ "name": "string" \ } \ ], \ "cc": [ \ { \ "email": "string", \ "name": "string" \ } \ ], \ "bcc": [ \ { \ "email": "string", \ "name": "string" \ } \ ], \ "headers": {}, \ "token_to": "string", \ "token_cc": "string", \ "token_bcc": "string", \ "attributes": {}, \ "dynamic_template_attributes": { \ "NAME": "string", \ "USER": "string" \ }, \ "attachments": [ \ { \ "content": "string", \ "name": "string" \ } \ ] \ } \ ], \ "from": { \ "email": "string", \ "name": "string" \ }, \ "reply_to": [ \ { \ "email": "string", \ "name": "string" \ } \ ], \ "subject": "string", \ "content": [ \ { \ "type": "string", \ "value": "string" \ } \ ], \ "template_id": 0, \ "tags": [ \ "string" \ ], \ "tracking_settings": { \ "click_tracking": { \ "enable": true \ }, \ "open_tracking": { \ "enable": true \ }, \ "subscription_tracking": { \ "enable": true \ } \ }, \ "mail_settings": { \ "footer": { \ "enable": true \ }, \ "amplets": { \ "enable": true \ } \ } \ }' ``` -------------------------------- ### POST Method Example for SMS Webhooks Source: https://cpaasdocs.netcorecloud.com/docs/netcore-sms/kqkxal037yhn5-sms-webhooks This example demonstrates a POST request to a webhook URL, typically used for sending structured SMS event data in JSON format. It includes fields like phone number, delivery time, status code, and transaction ID. ```HTTP POST /cbi_customized_pingback Host: voicefibre.mytoday.com Content-Type: application/json { "phone_number": "918770157371", "delivery_time": "2025-03-03 09:20:02", "status_code": "000", "sms_sent_date": "2025-03-03 09:20:00.716", "unique_id": "299448250746343287", "status_description": "Success", "transaction_id": "21491126946" } ``` -------------------------------- ### Enable Incoming Webhook Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/mscc3xzn0eh47-manage-webhook Use this example to enable an incoming webhook. Ensure the 'webhook_name' and 'status' are set correctly. ```json { "type": "incoming", "webhook_name": "Netcore_Webhook", "status": "enable" } ``` -------------------------------- ### Single Message API - GET Method Example Source: https://cpaasdocs.netcorecloud.com/docs/netcore-sms/nvlyafontwbiv-send-message-api Use this GET request to send a single message to up to 50 mobile numbers. Ensure all parameters are URL encoded. ```http https://test1bulksms.mytoday.com/BulkSms/SingleMsgApi?feedid=&username=&password=& To=&Text=&templateid=&entityid=&async=<1/0>&short=<1/0> ``` -------------------------------- ### Fetch Template List API Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/56azsboa7c2af-fetch-template-list-api This cURL command demonstrates how to fetch a list of WhatsApp templates using various filters and pagination parameters. Ensure you replace with your actual authorization token. ```cURL curl --location 'https://waapi.pepipost.com/api/v2/metainfo/template/list?status=Approved&template_name=test_temp&language=English&template_type=1,2&offset=0&limit=10' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Get Media API Response Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/rqu11g9vz5e9u-get-media This snippet shows the JSON response format when a requested media ID is not found. It indicates a failure status and provides a descriptive message. ```json { "status": "failure", "message": "Media with 38e9f3f7-6d6f-4a18-839c-fd5076b473 not found." } ``` -------------------------------- ### Fetch Template API Request Sample (cURL) Source: https://cpaasdocs.netcorecloud.com/docs/netcore-google-rcs-api-documentation/59tk0a7un2i7i-fetch-template-api This cURL command demonstrates how to make a GET request to the Fetch Template API. Ensure to replace placeholder headers with your actual credentials. ```shell curl --request GET \ --url https://soipapi.netcorecloud.com/rcs/template \ --header 'Content-Type: ' \ --header 'api_key: ' \ --header 'nc_bot_id: ' ``` -------------------------------- ### API Response Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/rbnyczsejvgox-send-message This is an example of a successful response from the Send Message API, indicating the message has been processed. ```json { "messageId": "2342asdn2348nert1mjzl" } ``` -------------------------------- ### Send a Quick and Simple Email Source: https://cpaasdocs.netcorecloud.com/docs/email-api-v6/qr29gfexpjpql-email-api-v6 Demonstrates how to send a basic email using the API. Ensure you have the necessary authentication and API endpoint configured. ```csharp using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; public class EmailSender { private readonly HttpClient _httpClient; private readonly string _apiKey; private readonly string _apiBaseUrl; public EmailSender(string apiKey, string apiBaseUrl) { _httpClient = new HttpClient(); _apiKey = apiKey; _apiBaseUrl = apiBaseUrl; _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {_apiKey}"); } public async Task SendSimpleEmailAsync(string toEmail, string subject, string body) { var requestUrl = $"{_apiBaseUrl}/send"; var payload = new { personalizations = new[] { new { to = new[] { new { email = toEmail } } } }, from = new { email = "sender@example.com" }, subject = subject, content = new[] { new { type = "text/plain", value = body } } }; var jsonPayload = System.Text.Json.JsonSerializer.Serialize(payload); var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json"); var response = await _httpClient.PostAsync(requestUrl, content); if (!response.IsSuccessStatusCode) { var errorContent = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Error sending email: {response.StatusCode} - {errorContent}"); throw new Exception($"Email sending failed: {errorContent}"); } Console.WriteLine("Email sent successfully!"); } // Example Usage: // public static async Task Main(string[] args) // { // var apiKey = "YOUR_API_KEY"; // var apiBaseUrl = "https://emailapi.netcorecloud.net/v6"; // Or your EU region URL // var sender = new EmailSender(apiKey, apiBaseUrl); // await sender.SendSimpleEmailAsync("recipient@example.com", "Test Subject", "This is the email body."); // } } ``` -------------------------------- ### Webhook Structure Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/8fcewxglu36mw-webhooks-v2 This is an example of the JSON payload structure for webhook events. It includes delivery status details for messages. ```json { "delivery_status": [ { "ncmessage_id": "string", "phoneNumber": "string", "pricing": { "billable": true, "category": "string", "pricing_model": "string", "type": "string" }, "received_at": "epoch_timestamp", "recipient": "string", "source": "string", "status": "string", "status_remark": "string", "x-apiheader": "string" } ] } ``` -------------------------------- ### Get Media Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/14ae197d6079c-get-media Fetches media from the netcore server using the provided media ID. This is a GET request to the /media/{mediaid} endpoint. ```APIDOC ## GET /api/v2/media/{mediaid} ### Description Use this API to fetch media from the netcore server using the media ID. ### Method GET ### Endpoint https://waapi.pepipost.com/api/v2/media/{mediaid} ### Parameters #### Path Parameters - **mediaid** (string) - Required - This is the media ID of the media that you want to retrieve. #### Headers - **Authorization** (string) - Required - Netcore WhatsApp Dashboard -> Settings -> Api Key ### Request Example ```shell curl --request GET \ --url https://waapi.pepipost.com/api/v2/media/{mediaid} \ --header 'Authorization: ' ``` ### Response #### Success Response (200) (Response structure not explicitly defined in the source, but implies media data is returned) #### Response Example (Response example not explicitly defined in the source) ``` -------------------------------- ### Suggested Action: Open URL Source: https://cpaasdocs.netcorecloud.com/docs/netcore-google-rcs-api-documentation/ebk87lep4ie7e-rich-card-file-message Use this suggestion to open a URL in the user's web browser. If a default handler app is registered for the URL, that app will open instead. ```json { "text": "Open Googs", "postbackdata": "test", "type": "OPEN_URL", "url": "https://www.google.com" } ``` -------------------------------- ### Get Media API Request (cURL) Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/14ae197d6079c-get-media This snippet shows how to make a GET request to the Get Media API endpoint using cURL to retrieve media associated with a specific media ID. Ensure you replace `{mediaid}` with the actual media ID and provide your Authorization token. ```shell curl --request GET \ --url https://waapi.pepipost.com/api/v2/media/{mediaid} \ --header 'Authorization: ' ``` -------------------------------- ### Edit Flow API Request Body Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/hiysa3vnaj6m6-edit-flow-api Example of the JSON body required to update flow metadata, including name and categories. ```json { "firstName": "Bob", "lastName": "Fellow", "email": "bob.fellow@gmail.com", "dateOfBirth": "1996-08-24" } ``` -------------------------------- ### Create LTO Template with Video Header Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/mijpy9dtgx0sv-limited-time-offer-lto-templates Creates a WhatsApp template for limited-time offers with a video in the header. This allows for dynamic and engaging promotional content. ```APIDOC ## Create Template with Video Header ### Description Creates a WhatsApp template for limited-time offers using a video in the header. ### Method POST ### Endpoint /api/v3/metainfo/template ### Parameters #### Request Body - **name** (string) - Required - The name of the template. - **language** (string) - Required - The language of the template. - **category** (string) - Required - The category of the template (e.g., "MARKETING"). - **components** (array) - Required - An array of template components. - **type** (string) - Required - The type of component (e.g., "HEADER", "BODY", "FOOTER", "BUTTON"). - **format** (string) - Required if type is "HEADER" - The format of the header (e.g., "IMAGE", "VIDEO", "DOCUMENT"). - **url** (string) - Required if format is "VIDEO" - The URL of the video. - **text** (string) - Required if type is "BODY" or "FOOTER" - The text content of the component. - **buttons** (array) - Required if type is "BUTTON" - An array of button objects. - **type** (string) - Required - The type of button (e.g., "QUICK_REPLY", "PHONE_NUMBER", "URL"). - **text** (string) - Required - The text displayed on the button. - **url** (string) - Required if type is "URL" - The URL the button links to. ``` -------------------------------- ### Send Single Message (GET) Source: https://cpaasdocs.netcorecloud.com/docs/netcore-sms/nvlyafontwbiv-send-message-api Allows sending a single message to up to 50 mobile numbers using a GET request. Parameters must be URL encoded. ```APIDOC ## GET /BulkSms/SingleMsgApi ### Description Sends a single SMS message to one or more mobile numbers (up to 50). ### Method GET ### Endpoint https://bulkpush.mytoday.com/BulkSms/SingleMsgApi ### Parameters #### Query Parameters - **feedid** (string) - Required - Account ID. - **username** (string) - Required - Username for authentication. - **password** (string) - Required - Password for authentication. - **To** (string) - Required - Mobile number(s) to send the message to. For multiple numbers, they should be comma-separated and URL encoded. - **Text** (string) - Required - The message content, URL encoded. - **templateid** (string) - Optional - The ID of the message template. - **entityid** (string) - Optional - The entity ID for DLT compliance. - **async** (0 or 1) - Optional - Set to 1 for asynchronous response, 0 for synchronous. - **short** (0 or 1) - Optional - Use for short URL functionality. ### Response #### Success Response (Async) - **REQID** (string) - The unique request ID for asynchronous responses. #### Response Example (Async) ```xml ``` ``` -------------------------------- ### RCS Template Message API Response Example Source: https://cpaasdocs.netcorecloud.com/docs/netcore-google-rcs-api-documentation/149c89ae6aae0-template-message-api This is an example of a successful response from the Template Message API, indicating the message has been processed. It includes a message ID for tracking. ```json { "messageId": "string", "requestError": { "serviceException": { "messageId": "string", "text": "string", "validationErrors": null } } } ``` -------------------------------- ### Generate Flow Preview URL Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/o0vkp4ob1oksj-generate-flow-preview-url-api Make an HTTP GET request to the endpoint to get a preview URL for a WhatsApp Flow. Include your flow ID and Bearer Token in the request. ```curl curl --request GET \ --url 'https://cpaaswa.netcorecloud.net/api/v3/metainfo/flow/preview?flow_id=%3Cyour_flow_id%3E' \ --header 'Authorization: ' ``` -------------------------------- ### Create Media Template (Document) Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/7dfy54q9nioru-create-media-template Use this endpoint to create a new media template with a document in the header. Ensure the Authorization header is correctly set. ```curl curl --request POST \ --url https://cpaaswa.netcore.net/api/v3/metainfo/template/create \ --header 'Authorization: ' \ --header 'Content-Type: application/json' \ --data '{ \ "meta_payload": { \ "name": "seasonal_promotion_text_only_document2", \ "language": "en", \ "category": "MARKETING", \ "components": [ \ { \ "type": "HEADER", \ "format": "document", \ "example": { \ "header_handle": [ \ "4::YXBwbGljYXRpb24vcGRm:ARbEvuurvBfUBIKyfIkgtS2VGs7M107ZxQvJ1mkAEwNFdVyy0e5-EhHutXVx8nK5LQXqzoV_ln4pCcIxYdtL3B-iuCLgVNgRTPoLPDAq9ypHjQ:e:1748009179:878254782770621:100057778901584:ARZ4ZtHbpEYJmWoobQI" \ ] \ } \ }, \ { \ "type": "BODY", \ "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", \ "example": { \ "body_text": [ \ [ \ "the end of August", \ "25OFF", \ "25%" \ ] \ ] \ } \ }, \ { \ "type": "FOOTER", \ "text": "Use the buttons below to manage your marketing subscriptions" \ }, \ { \ "type": "BUTTONS", \ "buttons": [ \ { \ "type": "QUICK_REPLY", \ "text": "Stop promotions" \ }, \ { \ "type": "QUICK_REPLY", \ "text": "Enjoy" \ }, \ { \ "type": "PHONE_NUMBER", \ "text": "Call", \ "phone_number": "917009508776" \ }, \ { \ "type": "URL", \ "text": "No tracking button", \ "url": "https://www.examplesite.com/shop?promo={{1}}", \ "example": [ \ "summer2023" \ ] \ }, \ { \ "type": "URL", \ "text": "Tracking button", \ "url": "https://www.examplesite.com/shop?promo={{1}}", \ "example": [ \ "https://www.examplesite.com/shop?promo=123" \ ] \ }, \ { \ "type": "COPY_CODE", \ "text": "Copy offer code", \ "example": "SAVE30" \ } \ ] \ } \ ] \ }, \ "nc_payload": { \ "source": "cee", \ "stop_at_cc": true, \ "thumbnail_url": "https://aws.s3.com/ceebucket/save_template.jpg", \ "usecase": "", \ "template_save_mode": "", \ "template_type": "media", \ "template_header": 4, \ "header_example_value": "https://cpaas-media-us.s3.amazonaws.com/whatsapp-media/dummy_20250519193617_1747663577950.pdf", \ "header_value": "https://www.google.com/dummy.pdf", \ "doc_file_name": "dummy.pdf", \ "button_value": [ \ { \ "button": "MarketingOptOut", \ "check_box": true \ }, \ { \ "button": "Custom" \ }, \ { \ "button": "CallPhoneNumber", \ "number": "+44-United Kingdom_7009508776" \ }, \ { \ "url_type": "withoutTracking", \ "button": "VisitWebsite" \ }, \ { \ "url": "https://qa.nctrckg.com", \ "url_type": "withTracking", \ "button": "VisitWebsite", \ "webUrl": "https://abcd.com" \ }, \ { \ "button": "CopyOfferCode" \ } \ ] \ } \ }' ``` -------------------------------- ### Opt-In/Opt-Out Request Body Example Source: https://cpaasdocs.netcorecloud.com/docs/whatsappapidoc/7e833f7d1c1fa-opt-in-opt-out-management This JSON object demonstrates the structure for opting a user in or out. Ensure the 'type' is set to 'optin' or 'optout' and provide recipient details including phone number and source of consent. ```json { "type": "optin", "recipients": [ { "recipient": "919876543210", "source": "WEB", "user_agent": "Mozilla", "ip": "192.168.7.26" } ] } ```