### Retrieve Template List Response Source: https://docs.thequickassist.co/rest-api Example JSON response structure returned when successfully fetching a list of WhatsApp templates. ```json { "success": true, "message": "Templates fetched successfully", "requestId": "7cf0743f-f852-4268-b5db-a2617dbd75b4", "data": { "items": [ { "_id": "661fb4d4bc6f62c4ef12a001", "chatBotId": "661fb310bc6f62c4ef128888", "metaTemplateName": "order_update", "language": "en_US", "category": "utility", "metaPayload": {}, "status": "approved", "version": 1, "createdAt": "2026-04-16T06:15:00.000Z", "updatedAt": "2026-04-16T06:15:00.000Z" } ], "pagination": { "page": 1, "limit": 10, "total": 1, "totalPages": 1 } } } ``` -------------------------------- ### GET /v1/templates Source: https://docs.thequickassist.co/rest-api Retrieve a list of all WhatsApp templates associated with your chatbot, including status, content, and metadata. ```APIDOC ## GET https://gateway-api.thequickassist.co/v1/templates ### Description Retrieve a list of all WhatsApp templates associated with your chatbot. Returns template details including status, content, and metadata. ### Method GET ### Endpoint https://gateway-api.thequickassist.co/v1/templates ### Parameters #### Query Parameters - **status** (string) - Optional - Filter by status, for example approved. - **search** (string) - Optional - Search by template name or language. - **page** (number) - Optional - Page number. Default is 1. - **limit** (number) - Optional - Items per page. Default is 10, maximum is 100. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - Status message. - **data** (object) - Contains the list of templates and pagination metadata. #### Response Example { "success": true, "message": "Templates fetched successfully", "requestId": "7cf0743f-f852-4268-b5db-a2617dbd75b4", "data": { "items": [ { "_id": "661fb4d4bc6f62c4ef12a001", "chatBotId": "661fb310bc6f62c4ef128888", "metaTemplateName": "order_update", "language": "en_US", "category": "utility", "metaPayload": {}, "status": "approved", "version": 1, "createdAt": "2026-04-16T06:15:00.000Z", "updatedAt": "2026-04-16T06:15:00.000Z" } ], "pagination": { "page": 1, "limit": 10, "total": 1, "totalPages": 1 } } } ``` -------------------------------- ### Retrieve Template List Request Source: https://docs.thequickassist.co/rest-api cURL command to retrieve the list of WhatsApp templates using an API key. ```bash curl --request GET \ --url https://gateway-api.thequickassist.co/v1/templates \ --header 'X-API-Key: YOUR_API_KEY' ``` -------------------------------- ### Webhook Notification Endpoint Source: https://docs.thequickassist.co/webhooks The endpoint on your server that receives POST requests containing WhatsApp event data from TheQuickAssist. ```APIDOC ## POST [Your Webhook URL] ### Description Receives real-time notifications for WhatsApp events including incoming messages, delivery status updates, and template triggers. The server must return a 2xx status code to acknowledge receipt. ### Method POST ### Request Body - **object** (string) - The object type (e.g., "whatsapp_business_account") - **entry** (array) - List of event entries containing changes and metadata ### Request Example { "object": "whatsapp_business_account", "entry": [ { "id": "WABA_BUSINESS_ACCOUNT_ID", "changes": [ { "field": "messages", "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "16505553333", "phone_number_id": "1234567890" }, "contacts": [ { "profile": { "name": "Customer Name" }, "wa_id": "1234567890" } ], "messages": [ { "from": "1234567890", "id": "wamid.HBgLMTIx...", "timestamp": "1718520000", "text": { "body": "Hey there!" }, "type": "text" } ] } } ] } ] } ``` -------------------------------- ### Verify Webhook Signature in Node.js Source: https://docs.thequickassist.co/webhooks Use this logic to validate the authenticity of incoming requests by comparing the provided signature against a locally generated HMAC hash. ```javascript const signature = req.headers['x-webhook-signature']; if (!signature) return res.status(401).send('Missing signature'); // Extract hash from signature format (sha256=hash) const parts = signature.split('='); const signatureHash = parts.length > 1 ? parts[1] : parts[0]; const payload = JSON.stringify(req.body); const expected = crypto .createHmac('sha256', WEBHOOK_SECRET) .update(payload) .digest('hex'); // Use timingSafeEqual to prevent timing attacks const matches = crypto.timingSafeEqual( Buffer.from(signatureHash, 'hex'), Buffer.from(expected, 'hex') ); if (!matches) { return res.status(401).send('Invalid signature'); } ``` -------------------------------- ### Meta WABA Webhook Payload Structure Source: https://docs.thequickassist.co/webhooks The raw JSON structure sent to your webhook endpoint for incoming message events. ```json { "object": "whatsapp_business_account", "entry": [ { "id": "WABA_BUSINESS_ACCOUNT_ID", "changes": [ { "field": "messages", "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "16505553333", "phone_number_id": "1234567890" }, "contacts": [ { "profile": { "name": "Customer Name" }, "wa_id": "1234567890" } ], "messages": [ { "from": "1234567890", "id": "wamid.HBgLMTIx...", "timestamp": "1718520000", "text": { "body": "Hey there!" }, "type": "text" } ] } } ] } ] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.