### Install n8n Community Node Source: https://kirem.co/integrations Install the official Kirem community node for n8n to build no-code WhatsApp automations. Available operations include sending messages, listing conversations, and triggering flows from incoming webhooks. ```bash npm install n8n-nodes-kirem ``` -------------------------------- ### Official SDK Usage Example Source: https://kirem.co/integrations Utilize ready-to-use SDKs for Go, TypeScript, and Python. These SDKs include strongly typed clients, retry mechanisms, and webhook verification helpers. ```APIDOC ## Official SDK ### Description Ready-to-use SDKs for Go, TypeScript, and Python, featuring strongly typed clients, retry logic, and webhook verification helpers. ### TypeScript Example ```typescript import { KiremClient } from "@kirem/sdk"; const kirem = new KiremClient({ apiKey: process.env.KIREM_API_KEY, }); await kirem.messages.send({ to: "+15551234567", type: "text", text: { body: "Hello from Kirem SDK" }, }); ``` ### Further Documentation [Explore SDKs](/docs) ``` -------------------------------- ### Install n8n-nodes-kirem Source: https://kirem.co/integrations Install the n8n Kirem nodes via npm. This package provides operations for sending WhatsApp messages, managing conversations, and triggering flows. ```bash // Install via npm npm install n8n-nodes-kirem ``` -------------------------------- ### Request Body Example for Creating a New Template Source: https://kirem.co/llms.txt This JSON object illustrates the structure for creating a new WhatsApp message template. It includes the template's name, category, language, and components like body text and buttons. ```json { "name": "konfirmasi_pesanan", "category": "UTILITY", "language": "id", "components": [ { "type": "BODY", "text": "Halo {{1}}, pesanan Anda #{{2}} telah dikonfirmasi. Estimasi pengiriman: {{3}} hari kerja." }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Lacak Pesanan" }, { "type": "URL", "text": "Lihat Status", "url": "https://kirem.id/pesanan/{{2}}" } ] } ] } ``` -------------------------------- ### Request Body Example for Updating Business Profile Source: https://kirem.co/llms.txt This JSON object demonstrates the structure of a request body to update a business profile. It includes optional fields like 'about', 'address', 'description', 'email', 'vertical', and 'websites'. ```json { "about": "Solusi Komunikasi Bisnis Terpadu", "address": "Gedung Cyber 2, Lt. 17, Jakarta Selatan", "description": "Kirem menyediakan API WhatsApp handal untuk integrasi enterprise.", "email": "help@kirem.id", "vertical": "RETAIL", "websites": [ "https://kirem.id", "https://kirem.id/blog" ] } ``` -------------------------------- ### Success Response Example for Updating Business Profile Source: https://kirem.co/llms.txt This JSON object shows a successful response after updating a business profile. It confirms the operation with a status, message, and a success boolean. ```json { "status": 200, "message": "Business profile updated successfully", "data": { "success": true } } ``` -------------------------------- ### Success Response Example for Business Profile Retrieval Source: https://kirem.co/llms.txt This JSON object illustrates a successful response when retrieving a business profile. It includes status, message, and detailed business data. ```json { "status": 200, "message": "Business profile retrieved successfully", "data": { "about": "Solusi Komunikasi Bisnis Terbaik", "address": "Gedung Cyber 2, Lt. 15, Jakarta Selatan", "description": "Kirem adalah platform WhatsApp Business API Developer Terpercaya.", "email": "support@kirem.id", "vertical": "RETAIL", "websites": [ "https://kirem.id", "https://docs.kirem.id" ], "profile_picture_url": "https://pps.whatsapp.net/v/t61.24694-24/..." } } ``` -------------------------------- ### Send Text Message Success Response Source: https://kirem.co/llms.txt Example of a successful response when sending a text message. It includes details about the sent message and recipient. ```json { "status": 200, "message": "Message sent successfully", "data": { "messaging_product": "whatsapp", "contacts": [{ "input": "6281234567890", "wa_id": "6281234567890" }], "messages": [{ "id": "wamid.HBgNNjI4MTIzNDU2Nzg5MBcGAgQRFRMyFAA=" }] } } ``` -------------------------------- ### Configure Kirem Node for Welcome Message (n8n) Source: https://kirem.co/llms.txt Configure the Kirem node in n8n to send a welcome message. Set the resource to 'Message' and operation to 'Send'. Dynamically capture the sender's number for the 'To' field. ```text Resource : Message Operation : Send Phone Number ID : (ID nomor WhatsApp Anda dari Dasbor Kirem) To : {{ $json.body.entry[0].changes[0].value.messages[0].from }} Message Type : Text Body : Halo! 👋 Selamat datang di layanan kami. Berikut yang bisa saya bantu: - Ketik *Harga* untuk info produk & harga - Ketik *Bantuan* untuk bantuan pelanggan - Ketik *Jam* untuk jam operasional ``` -------------------------------- ### Infrastructure Solution Section Source: https://kirem.co/ A section highlighting a reliable infrastructure solution that doesn't require self-building. ```html
SolusiSolusinya

Infrastruktur andal yang tak perlu Anda bangun sendiri

Format API yang 100% Konsisten
``` -------------------------------- ### Expose Local Server with ngrok Source: https://kirem.co/llms.txt This command uses ngrok to expose your local development server (running on port 5678) to the internet. This is useful for making local webhooks, like those for an n8n WhatsApp bot, accessible externally. ```bash ngrok http 5678 ``` -------------------------------- ### Create Template Source: https://kirem.co/llms.txt Creates a new message template with specified components for use in WhatsApp communication. ```APIDOC ## POST /v1/templates ### Description Creates a new template with specified components. ### Method POST ### Endpoint https://api.kirem.co/v1/templates ### Parameters #### Request Body - **name** (string) - Required - The name of the template. - **category** (string) - Required - The category of the template (e.g., UTILITY). - **language** (string) - Required - The language of the template (e.g., id). - **components** (array) - Required - An array of template components. - **type** (string) - Required - The type of component (e.g., BODY, BUTTONS). - **text** (string) - Optional - The text content for BODY components or button text. - **buttons** (array) - Optional - An array of buttons for BUTTONS components. - **type** (string) - Required - The type of button (e.g., QUICK_REPLY, URL). - **text** (string) - Required - The text displayed on the button. - **url** (string) - Optional - The URL for URL type buttons. ### Request Example ```json { "name": "konfirmasi_pesanan", "category": "UTILITY", "language": "id", "components": [ { "type": "BODY", "text": "Halo {{1}}, pesanan Anda #{{2}} telah dikonfirmasi. Estimasi pengiriman: {{3}} hari kerja." }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Lacak Pesanan" }, { "type": "URL", "text": "Lihat Status", "url": "https://kirem.co.id/pesanan/{{2}}" } ] } ] } ``` ``` -------------------------------- ### Download Media File using cURL Source: https://kirem.co/llms.txt Use this cURL command to download a media file from the API. Replace `media_id` with the actual media ID and `kirem_live_xxx` with your authorization token. The output file name can be specified with `--output`. ```bash curl -X GET "https://api.kirem.co/v1/media/18471948194819/download" \ -H "Authorization: Bearer kirem_live_xxx" \ --output downloaded_image.png ``` -------------------------------- ### Configure Webhook Endpoint Source: https://kirem.co/integrations Set up a webhook to receive events from Kirem. Specify the URL, the events to subscribe to, and a secret for HMAC verification. The API supports retries and provides delivery logs. ```http POST /v1/webhooks { "url": "https://your-app.com/webhooks/kirem", "events": ["messages", "message_status"], "secret": "whsec_..." } ``` -------------------------------- ### Official SDKs for Kirem Source: https://kirem.co/integrations Kirem provides official SDKs for Go, TypeScript, and Python to simplify integration with the MCP server. ```text SDK siap pakai untuk Go, TypeScript, dan Python. ``` -------------------------------- ### Download Media to File using Axios (Node.js) Source: https://kirem.co/llms.txt Use this snippet to download media files from a URL and save them locally using Node.js. Requires 'axios' and 'fs' modules. Ensure the API endpoint and authorization are correct. ```javascript const axios = require('axios'); const fs = require('fs'); axios.get('https://api.kirem.co/v1/media/18471948194819/download', { headers: { 'Authorization': 'Bearer kirem_live_xxx' }, responseType: 'stream' }).then(res => { res.data.pipe(fs.createWriteStream('downloaded_image.png')); console.log('File berhasil disimpan!'); }); ``` -------------------------------- ### Initialize Kirem SDK and Send Message Source: https://kirem.co/integrations Use the official Kirem SDK for TypeScript to send WhatsApp messages. Ensure your API key is set as an environment variable. The SDK includes strongly typed clients, retry logic, and webhook verification helpers. ```typescript import { KiremClient } from "@kirem/sdk"; const kirem = new KiremClient({ apiKey: process.env.KIREM_API_KEY, }); await kirem.messages.send({ to: "+15551234567", type: "text", text: { body: "Hello from Kirem SDK" }, }); ``` -------------------------------- ### Next.js Metadata and Script Loading Source: https://kirem.co/ Illustrates Next.js internal structure for rendering metadata and loading scripts asynchronously. ```javascript self.__next_f.push([1,"10:[\"$\",\"$L2d\",null,{}]\n11:[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/2p3hibqhknf1j.js\",\"async\":true,\"nonce\":\"$undefined\"}]\n12:[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/38y9bjsou-koo.js\",\"async\":true,\"nonce\":\"$undefined\"}]\n13:[\"$\",\"$L2e\",null,{\"children\":[\"$\",\"$2f\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@30\"}]}\\n14:[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L31\",null,{\"children\":\"$L32\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L33\",null,{\"children\":[\"$\",\"$2f\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L34\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]}]}]\n16:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/233p45nuh4m5b.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n17:[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0f1knkuo5cexf.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])self.__next_f.push([1,"18:[\"$\",\"title\",null,{\"children\":\"x circle\"}]\n19:[\"$\",\"path\",null,{\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"d\":\"M6 18L18 6M6 6l12 12\"}]\n1a:[\"$\",\"div\",null,{\"children\":[[\"$\",\"h3\",null,{\"className\":\"font-bold text-slate-800 dark:text-slate-200 text-lg mb-1\",\"children\":\"Keamanan data sangat berisiko\"}],[\"$\",\"p\",null,{\"className\":\"text-slate-600 dark:text-slate-400 leading-relaxed text-sm md:text-base\",\"children\":[\"Token dan data sensitif pelanggan tersebar di berbagai\",\" \",[\"$\",\"i\",null,{\"children\":\"environment\"}],\" tanpa isolasi tenant yang ketat.\"}]}]}]\n1b:[\"$\",\"div\",null,{\"className\":\"flex justify-center relative z-20 -mb-8 pointer-events-none\",\"children\":[\"$\",\"div\",null,{\"className\":\"bg-blue-600 p-3 rounded-full border-[6px] border-slate-50 dark:border-slate-950 shadow-xl animate-bounce transition-colors duration-300\",\"children\":[\"$\",\"svg\",null,{\"className\":\"w-6 h-6 text-white\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\",\"stroke\":\"currentColor\",\"strokeWidth\":3,\"children\":[[\"$\",\"title\",null,{\"children\":\"Panah\"}],[\"$\",\"path\",null,{\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"d\":\"M19 14l-7 7m0 0l-7-7m7 7V3\"}]}]}]}]}]\n"])self.__next_f.push([1,"1c:[\"$\",\"div\",null,{\"className\":\"bg-slate-900 dark:bg-[#0a0f1c] rounded-3xl p-6 md:p-12 pt-16 border border-slate-800 dark:border-blue-900/30 shadow-[0_20px_50px_-12px_rgba(37,99,235,0.25)] dark:shadow-[0_20px_50px_-12px_rgba(37,99,235,0.15)] relative z-10 overflow-hidden transition-colors duration-300\",\"children\":[[\"$\",\"div\",null,{\"className\":\"absolute top-0 left-1/2 -translate-x-1/2 w-full h-1/2 bg-blue-500/10 dark:bg-blue-500/20 blur-[80px] pointer-events-none rounded-full\"}],[\"$\",\"div\",null,{\"className\":\"flex flex-col items-center text-center mb-10 relative z-10\",\"children\":[[\"$\",\"div\",null,{\"className\":\"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-blue-500/20 border border-blue-500/30 text-blue-400 text-xs font-bold uppercase tracking-wide mb-6 backdrop-blur-sm\",\"children\":[[\"$\",\"svg\",null,{\"className\":\"w-4 h-4\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\",\"stroke\":\"currentColor\",\"strokeWidth\":2,\"children\":[[\"$\",\"title\",null,{\"children\":\"Solusi\"}],[\"$\",\"path\",null,{\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"d\":\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"}]}]},\"Solusinya\"]},[\"$\",\"h2\",null,{\"className\":\"text-3xl md:text-4xl font-extrabold text-white tracking-tight mb-4\",\"children\":[\"Infrastruktur andal yang\",[\"$\",\"br\",null,{\"className\":\"hidden md:block\"}],\" tak perlu Anda bangun sendiri\"}]}]],[\"$\",\"div\",null,{\"className\":\"space-y-4 relative z-10\",\"children\":[[\"$\",\"div\",\"Format API yang 100% Konsisten\",{\"className\":\"flex gap-4 items-start p-5 md:p-6 rounded-2xl bg-white/5 border border-white/10 hover:bg-white/10 transition-colors backdrop-blur-sm\",\"children\":[[\"$\",\"div\",null,{\"className\":\"mt-1 p-1.5 bg-blue-500 rounded-full shrink-0 shadow-lg shadow-blue-500/30\",\"children\":[\"$\",\"svg\",null,{\"className\":\"w-4 h-4\"}]}]}]}]}]}]}] ``` -------------------------------- ### Model Context Protocol (MCP) Configuration Source: https://kirem.co/integrations Enable AI agents to manage WhatsApp natively. Kirem exposes a secure MCP server with tools for sending messages and reading conversation history. ```APIDOC ## Model Context Protocol (MCP) ### Description Allow AI agents to manage WhatsApp natively. Kirem exposes a secure MCP server with tools for sending messages and reading conversation history. ### Configuration Example ```json { "name": "kirem", "transport": "sse", "url": "https://api.kirem.co/v1/mcp", "headers": { "Authorization": "Bearer $KIREM_API_KEY" } } ``` ### Further Documentation [Read MCP Guide](/docs) ``` -------------------------------- ### Configure Switch Node for Keyword Matching (n8n) Source: https://kirem.co/llms.txt Configure a Switch node in n8n to route messages based on keywords. Use the message body as input and define rules for matching specific terms. ```text Mode : Rules Input : {{ $json.body.entry[0].changes[0].value.messages[0].text.body }} Aturan | Operator | Nilai | Output ---|---|---|--- `contains` | Halo | 1 (Sambutan) | `contains` | Hai | 1 (Sambutan) | `contains` or `matches` | Harga | 2 (Harga) | `contains` or `matches` | Bantuan | 3 (Bantuan) | `contains` or `matches` | Jam | 4 (Jam Operasional) | ``` -------------------------------- ### Configure MCP Server Connection Source: https://kirem.co/integrations Configure your AI agents to manage WhatsApp natively using Kirem's MCP server. This configuration includes the server URL, transport type, and authorization headers. ```json { "name": "kirem", "transport": "sse", "url": "https://api.kirem.co/v1/mcp", "headers": { "Authorization": "Bearer $KIREM_API_KEY" } } ``` -------------------------------- ### Model Context Protocol (MCP) Source: https://kirem.co/integrations The Model Context Protocol (MCP) allows AI agents to natively manage WhatsApp. This enables seamless integration of AI into your communication workflows. ```text Biarkan AI agents mengelola WhatsApp secara native. ``` -------------------------------- ### Create Message Notification Template Source: https://kirem.co/llms.txt Use the POST /v1/templates endpoint to create a WhatsApp message template for new order notifications. Ensure the template is approved before proceeding. ```APIDOC ## POST /v1/templates ### Description Gunakan endpoint POST /v1/templates untuk membuat templat pesan WhatsApp yang akan digunakan untuk notifikasi pesanan baru. Pastikan templat disetujui sebelum melanjutkan. ### Request Body ```json { "name": "notif_pesanan_baru", "category": "UTILITY", "language": "id", "components": [ { "type": "BODY", "text": "Halo {{1}}, terima kasih telah berbelanja di {{2}}!\n\nPesanan #{{3}} telah kami terima.\nTotal: Rp {{4}}\n\nKami akan segera memproses pesanan Anda." } ] } ``` ``` -------------------------------- ### MCP Server API Configuration Source: https://kirem.co/integrations Configuration details for connecting to the Kirem MCP server via SSE. Ensure your API key is set as an environment variable. ```json { "name": "kirem", "transport": "sse", "url": "https://api.kirem.co/v1/mcp", "headers": { "Authorization": "Bearer $KIREM_API_KEY" } } ``` -------------------------------- ### Upload Media to WhatsApp Source: https://kirem.co/llms.txt Upload media files (like images or documents) to be used in WhatsApp messages. This endpoint returns a media ID that can be referenced. ```APIDOC ## POST /v1/media ### Description Upload media files (like images or documents) to be used in WhatsApp messages. This endpoint returns a media ID that can be referenced. ### Method POST ### Endpoint /v1/media ### Request Body - **file** (binary file) - Required - The media file to upload. - **messaging_product** (string) - Required - Specifies the messaging product, e.g., "whatsapp". ### Response #### Success Response (200 OK) - **status** (integer) - The HTTP status code. - **message** (string) - A confirmation message. - **data** (object) - Contains details about the uploaded media. - **id** (string) - The unique ID of the uploaded media. #### Response Example { "status": 200, "message": "Media uploaded successfully", "data": { "id": "1049284050215893" } } ``` -------------------------------- ### Configure Webhook Endpoint Source: https://kirem.co/integrations Set up a webhook endpoint to receive WhatsApp events from Kirem, such as messages and message status updates. The payload is HMAC-signed for security. You can route events to multiple endpoints with built-in retry and delivery logs. ```json { "url": "https://your-app.com/webhooks/kirem", "events": ["messages", "message_status"], "secret": "whsec_..." } ``` -------------------------------- ### Create WhatsApp Message Template for Order Notifications (API) Source: https://kirem.co/llms.txt Use this JSON payload with the POST /v1/templates endpoint to create a WhatsApp message template for new order notifications. Ensure the template is approved before use. ```json { "name": "notif_pesanan_baru", "category": "UTILITY", "language": "id", "components": [ { "type": "BODY", "text": "Halo {{1}}, terima kasih telah berbelanja di {{2}}!\n\nPesanan #{{3}} telah kami terima.\nTotal: Rp {{4}}\n\nKami akan segera memproses pesanan Anda." } ] } ``` -------------------------------- ### Upload Media Request Body Source: https://kirem.co/llms.txt This endpoint handles media uploads using multipart form-data. Include the file and specify the messaging product. ```json { "messaging_product": "whatsapp" } ``` -------------------------------- ### Update Business Profile Source: https://kirem.co/llms.txt Allows users to update their official WhatsApp Business profile details instantly to Meta. ```APIDOC ## POST /v1/profile ### Description Memperbarui detail profil WhatsApp Business resmi Anda secara instan ke Meta. ### Method POST ### Endpoint /v1/profile #### Query Parameters - **channel_id** (String - Wajib): ID saluran WhatsApp terdaftar. #### Request Body - **about** (String - Opsional): Informasi singkat tentang bisnis Anda (maksimal 139 karakter). - **address** (String - Opsional): Alamat fisik bisnis Anda (maksimal 256 karakter). - **description** (String - Opsional): Deskripsi bisnis Anda (maksimal 256 karakter). - **email** (String - Opsional): Email kontak resmi bisnis Anda. - **vertical** (String - Opsional): Kategori industri bisnis Anda. Nilai yang didukung meliputi: `AUTO`, `BEAUTY`, `APPAREL`, `EDU`, `ENTERTAIN`, `FINANCE`, `GROCERY`, `GOVT`, `HOTEL`, `HEALTH`, `NONPROFIT`, `PROF_SERVICES`, `RETAIL`, `TRAVEL`, `RESTAURANT`, atau `OTHER`. - **websites** (Array of Strings - Opsional): Daftar situs web resmi (maksimal 2 tautan). ### Request Example ```json { "about": "Solusi Komunikasi Bisnis Terpadu", "address": "Gedung Cyber 2, Lt. 17, Jakarta Selatan", "description": "Kirem menyediakan API WhatsApp handal untuk integrasi enterprise.", "email": "help@kirem.id", "vertical": "RETAIL", "websites": [ "https://kirem.id", "https://kirem.id/blog" ] } ``` ### Response #### Success Response (200 OK) - **status** (Integer) - Kode status respons. - **message** (String) - Pesan yang menjelaskan hasil operasi. - **data** (Object) - Objek yang berisi status pembaruan. - **success** (Boolean) - Menunjukkan apakah pembaruan berhasil. #### Response Example ```json { "status": 200, "message": "Business profile updated successfully", "data": { "success": true } } ``` ``` -------------------------------- ### Send Video Message using URL (API) Source: https://kirem.co/llms.txt Use this JSON payload to send a video message via the Kirem API using a direct video URL. Ensure the 'link' and 'to' fields are correctly populated. ```json { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "62812345678", "type": "video", "video": { "link": "https://kirem.id/assets/demo-video.mp4", "caption": "Video Tutorial Penggunaan Kirem API" } } ``` -------------------------------- ### Kirem API Authentication Header Source: https://kirem.co/llms.txt Use this header for authenticating your requests to the Kirem API. Replace `` with your actual API key. ```http Authorization: Bearer ``` -------------------------------- ### Send Video Message via Endpoint Source: https://kirem.co/llms.txt This endpoint is used to send video files (MP4/3GP) to customers. It supports sending using either a Meta Media ID or an external video URL. ```APIDOC ## POST /v1/messages ### Description Endpoint ini digunakan untuk mengirimkan berkas video (MP4/3GP) ke pelanggan. Layaknya gambar, pengiriman video mendukung dua metode: menggunakan **Media ID** Meta atau menggunakan **Tautan URL** video eksternal secara langsung. ### Method POST ### Endpoint - `POST /v1/messages` (Routing otomatis menggunakan saluran aktif pertama) - `POST /v1/:phone_number_id/messages` (Routing melalui nomor tertentu) ### Headers - `Authorization: Bearer ` - `Content-Type: application/json` ### Request Body #### Metode A: Menggunakan Media ID (Direkomendasikan) ```json { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "62812345678", "type": "video", "video": { "id": "18471948194820", "caption": "Silakan tonton video demo produk kami" } } ``` #### Metode B: Menggunakan Tautan URL Langsung ```json { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "62812345678", "type": "video", "video": { "link": "https://kirem.id/assets/demo-video.mp4", "caption": "Video Tutorial Penggunaan Kirem API" } } ``` ### Parameters #### Request Body Parameters - `type` (String - Wajib): Set nilai ke `"video"`. - `video.id` (String - Wajib jika tidak memakai link): ID media video hasil unggahan. - `video.link` (String - Wajib jika tidak memakai ID): Tautan HTTPS langsung ke file video (harus berakhiran format video, misal `.mp4`/`.3gp`). - `video.caption` (String - Opsional): Teks keterangan yang disematkan tepat di bawah pratinjau video di aplikasi pelanggan. ### Response #### Success Response (201 Created) ```json { "status": 201, "message": "Message sent successfully", "data": { "messaging_product": "whatsapp", "contacts": [{"input": "62812345678", "wa_id": "62812345678"}], "messages": [{"id": "wamid.HBgLNjI4MTIzNDU2NzhGFgQ0NDMzMzc3RUQ1OEFG"}] } } ``` - `messages[0].id`: ID pesan unik untuk melacak status pengantaran via webhook. ``` -------------------------------- ### Send Text Message (Meta-Compatible) Source: https://kirem.co/llms.txt Send a simple text message to a recipient via WhatsApp. This endpoint is compatible with Meta's messaging product. ```APIDOC ## POST /v1/messages ### Description Send a simple text message to a recipient via WhatsApp. This endpoint is compatible with Meta's messaging product. ### Method POST ### Endpoint /v1/messages ### Request Body - **messaging_product** (string) - Required - Specifies the messaging product, e.g., "whatsapp". - **recipient_type** (string) - Required - The type of recipient, e.g., "individual". - **to** (string) - Required - The recipient's phone number. - **type** (string) - Required - The message type, must be "text". - **text** (object) - Required - Contains the text message content. - **body** (string) - Required - The actual message content. ### Request Example { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "6281234567890", "type": "text", "text": { "body": "Halo dari Kirem!" } } ### Response #### Success Response (200 OK) - **status** (integer) - The HTTP status code. - **message** (string) - A confirmation message. - **data** (object) - Contains details about the sent message. - **messaging_product** (string) - The messaging product used. - **contacts** (array) - Information about the recipient contacts. - **input** (string) - The input phone number. - **wa_id** (string) - The WhatsApp ID of the recipient. - **messages** (array) - Information about the sent messages. - **id** (string) - The unique ID of the message. #### Response Example { "status": 200, "message": "Message sent successfully", "data": { "messaging_product": "whatsapp", "contacts": [{ "input": "6281234567890", "wa_id": "6281234567890" }], "messages": [{ "id": "wamid.HBgNNjI4MTIzNDU2Nzg5MBcGAgQRFRMyFAA=" }] } } ``` -------------------------------- ### Send Template Message (Meta-Compatible) Source: https://kirem.co/llms.txt Send a pre-defined template message to a recipient via WhatsApp. This is useful for notifications and transactional messages. ```APIDOC ## POST /v1/messages ### Description Send a pre-defined template message to a recipient via WhatsApp. This is useful for notifications and transactional messages. ### Method POST ### Endpoint /v1/messages ### Request Body - **messaging_product** (string) - Required - Specifies the messaging product, e.g., "whatsapp". - **recipient_type** (string) - Required - The type of recipient, e.g., "individual". - **to** (string) - Required - The recipient's phone number. - **type** (string) - Required - The message type, must be "template". - **template** (object) - Required - Contains the template message details. - **name** (string) - Required - The name of the template. - **language** (object) - Required - The language of the template. - **code** (string) - Required - The language code, e.g., "id". - **components** (array) - Required - The components of the template message. - **type** (string) - Required - The type of component, e.g., "body". - **parameters** (array) - Required - The parameters for the component. - **type** (string) - Required - The type of parameter, e.g., "text". - **text** (string) - Required - The parameter value. ### Request Example { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "6281234567890", "type": "template", "template": { "name": "otp_verification", "language": { "code": "id" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "123456" } ] } ] } } ``` -------------------------------- ### Send Video Message using Media ID (API) Source: https://kirem.co/llms.txt Use this JSON payload to send a video message via the Kirem API using a Meta Media ID. Ensure the 'id' and 'to' fields are correctly populated. ```json { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "62812345678", "type": "video", "video": { "id": "18471948194820", "caption": "Silakan tonton video demo produk kami" } } ``` -------------------------------- ### n8n Community Node Operations Source: https://kirem.co/integrations Automate WhatsApp with the official Kirem n8n community node. Available operations include sending messages, listing conversations, retrieving conversation timelines, and triggering flows via incoming webhooks. ```APIDOC ## n8n Community Node ### Description Automate WhatsApp no-code workflows using the official Kirem n8n community node. This node allows you to send messages, view conversation lists, and trigger flows from incoming webhooks. ### Operations - Send WhatsApp Message - List Conversations - Get Conversation Timeline - Trigger on Incoming Webhook ### Installation ```bash npm install n8n-nodes-kirem ``` ### Further Documentation [See n8n Documentation](/docs) ``` -------------------------------- ### Send WhatsApp Template Message Source: https://kirem.co/llms.txt Use this endpoint to send pre-approved message templates via WhatsApp. It's required for initiating conversations outside the 24-hour window. Ensure the template name, language code, and components are correctly specified. ```json { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "62812345678", "type": "template", "template": { "name": "promo_diskon_baru", "language": { "code": "id" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Budi" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "50" }, { "type": "text", "text": "HEMAT50" } ] } ] } } ``` -------------------------------- ### Send a Text Message with Kirem SDK Source: https://kirem.co/integrations Use the Kirem SDK to send a text message to a specified phone number. Ensure your API key is set in the environment variables. ```javascript import { KiremClient } from "@kirem/sdk"; const kirem = new KiremClient({ apiKey: process.env.KIREM_API_KEY, }); await kirem.messages.send({ to: "+15551234567", type: "text", text: { body: "Hello from Kirem SDK" }, }); ``` -------------------------------- ### WhatsApp API Success Response Source: https://kirem.co/llms.txt This is a sample success response for sending a WhatsApp message. It confirms the message status and provides details about the contacts and messages sent. ```json { "status": 201, "message": "Message sent successfully", "data": { "messaging_product": "whatsapp", "contacts": [ { "input": "62812345678", "wa_id": "62812345678" } ], "messages": [ { "id": "wamid.HBgLNjI4MTIzNDU2NzhGFgQ0NDMzMzc3RUQ1OEFG" } ] } } ``` -------------------------------- ### Webhook & API Endpoint Source: https://kirem.co/integrations Receive every WhatsApp event with an HMAC-signed payload. Route events to multiple endpoints with built-in retry and delivery logs. ```APIDOC ## Webhook & API ### Description Receive every WhatsApp event with an HMAC-signed payload. Route events to multiple endpoints with built-in retry and delivery logs. ### Endpoint `POST /v1/webhooks` ### Request Body Example ```json { "url": "https://your-app.com/webhooks/kirem", "events": ["messages", "message_status"], "secret": "whsec_..." } ``` ### Further Documentation [Webhook Documentation](/docs/config-webhooks) ``` -------------------------------- ### Data Security Risk Warning Source: https://kirem.co/ Displays a warning about data security risks, specifically concerning tokens and sensitive customer data. ```html
Panah
``` -------------------------------- ### POST /v1/messages Source: https://kirem.co/llms.txt Endpoint to send message templates. It can be routed automatically via the first active channel or specifically through a phone number ID. Message templates are required for initiating new conversations with customers outside the 24-hour interaction window. ```APIDOC ## POST /v1/messages ### Description Endpoint ini digunakan untuk mengirimkan pesan menggunakan templat pesan (_Message Template_) yang telah didaftarkan dan disetujui (_APPROVED_) oleh Meta. Templat pesan wajib digunakan untuk membuka sesi obrolan baru dengan pelanggan jika di luar jendela interaksi 24 jam. ### Method POST ### Endpoint - `POST /v1/messages` (Routing otomatis menggunakan saluran aktif pertama) - `POST /v1/:phone_number_id/messages` (Routing melalui nomor tertentu) ### Headers - `Authorization: Bearer ` - `Content-Type: application/json ### Request Body ```json { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "62812345678", "type": "template", "template": { "name": "promo_diskon_baru", "language": { "code": "id" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Budi" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "50" }, { "type": "text", "text": "HEMAT50" } ] } ] } } ``` ### Parameters #### Request Body Fields - `messaging_product` (String - Wajib): Produk pengiriman pesan, contoh: `"whatsapp"`. - `recipient_type` (String - Wajib): Tipe penerima, contoh: `"individual"`. - `to` (String - Wajib): Nomor telepon penerima. - `type` (String - Wajib): Tipe pesan, harus `"template"`. - `template` (Object - Wajib): Objek yang berisi detail templat pesan. - `name` (String - Wajib): Nama unik templat pesan yang sudah disetujui Meta. - `language` (Object - Wajib): Objek yang berisi kode bahasa templat. - `code` (String - Wajib): Kode bahasa templat (misal: `"id"` untuk Bahasa Indonesia, `"en"` untuk Bahasa Inggris). - `components` (Array - Opsional): Kumpulan komponen yang mendefinisikan nilai variabel dinamis pada templat. - `type` (String - Wajib): Jenis komponen (`header`, `body`, `button`). - `parameters` (Array - Wajib): Array nilai parameter yang disubstitusikan ke dalam variabel secara berurutan. - `type` (String - Wajib): Tipe parameter (`text`, `currency`, `date_time`, `image`, `document`, `video`). - `text` (String - Wajib): Isi nilai teks pengganti jika tipe parameter adalah `"text"`. ### Response #### Success Response (201 Created) ```json { "status": 201, "message": "Message sent successfully", "data": { "messaging_product": "whatsapp", "contacts": [ { "input": "62812345678", "wa_id": "62812345678" } ], "messages": [ { "id": "wamid.HBgLNjI4MTIzNDU2NzhGFgQ0NDMzMzc3RUQ1OEFG" } ] } } ``` #### Response Fields - `status` (Integer): Kode status respons HTTP. - `message` (String): Pesan status pengiriman. - `data` (Object): Objek berisi detail pengiriman pesan. - `messaging_product` (String): Produk pengiriman pesan. - `contacts` (Array): Array informasi kontak penerima. - `input` (String): Input nomor telepon penerima. - `wa_id` (String): WhatsApp ID penerima. - `messages` (Array): Array informasi pesan yang dikirim. - `id` (String): ID pesan untuk memantau status pengantaran via webhook callback. ```