# WhatsApp

Enables interaction with customers through the WhatsApp Business API for messaging and automation. Only supports WhatsApp Business accounts, not WhatsApp Personal accounts.

- **Category:** phone & sms
- **Auth:** OAUTH2, API_KEY
- **Composio Managed App Available?** Yes
- **Tools:** 17
- **Triggers:** 1
- **Slug:** `WHATSAPP`
- **Version:** 20260414_00

## Frequently Asked Questions

### Why isn't my WhatsApp message being delivered?

WhatsApp has a 24-hour customer service window. Recipients only receive messages within 24 hours of their last message to you. To message outside this window, use a template message.

### Why is my WhatsApp connection failing with "Missing required fields"?

Ensure all required fields are provided when initiating the connection. See the [WhatsApp authentication details](https://docs.composio.dev/toolkits/whatsapp#authentication-details).

---

## Tools

### Create message template

**Slug:** `WHATSAPP_CREATE_MESSAGE_TEMPLATE`

Create a new message template for the WhatsApp Business Account. Templates must be approved by WhatsApp before they can be used. Templates are required for marketing messages and messages sent outside the 24-hour window.

### Delete message template

**Slug:** `WHATSAPP_DELETE_MESSAGE_TEMPLATE`

Delete a message template from the WhatsApp Business Account by name. This permanently removes the template and it cannot be recovered. When you delete a template by name, all templates with that name across all languages will be deleted. Names of deleted templates cannot be reused for 30 days. Important: Only delete templates that are no longer needed, as this operation is irreversible.

### Get business profile

**Slug:** `WHATSAPP_GET_BUSINESS_PROFILE`

Get the business profile information for a WhatsApp Business phone number. This includes business details like description, address, website, and contact info.

### Get media info

**Slug:** `WHATSAPP_GET_MEDIA_INFO`

Get metadata and download URL for uploaded WhatsApp media. Returns media ID, download URL (valid for 5 minutes), MIME type, SHA256 hash, and file size. The download URL can be used to retrieve the actual media file.

### Get message templates

**Slug:** `WHATSAPP_GET_MESSAGE_TEMPLATES`

Get all message templates for the WhatsApp Business Account. Templates are required for sending messages outside the 24-hour window and for marketing/utility messages.

### Get phone number

**Slug:** `WHATSAPP_GET_PHONE_NUMBER`

Retrieve detailed information about a specific WhatsApp Business phone number. Returns phone number details including verification status, quality rating, display number, verified business name, throughput limits, and webhook configuration. Use this to check phone number status, settings, and capabilities. To get available phone number IDs, first call WHATSAPP_GET_PHONE_NUMBERS.

### Get phone numbers

**Slug:** `WHATSAPP_GET_PHONE_NUMBERS`

Retrieve all phone numbers registered to your WhatsApp Business Account. Returns phone number IDs, display numbers, verification status, quality ratings, and messaging throughput limits. Use the phone number ID from the response to send WhatsApp messages via other API actions.

### Get template status

**Slug:** `WHATSAPP_GET_TEMPLATE_STATUS`

Get the status and details of a specific message template. This is useful for checking if a template has been approved, rejected, or is still pending review.

### Send contacts

**Slug:** `WHATSAPP_SEND_CONTACTS`

Send contacts WhatsApp number. Note: The message will be delivered to the recipient only if they have initiated a conversation first.

### Send interactive buttons

**Slug:** `WHATSAPP_SEND_INTERACTIVE_BUTTONS`

Send an interactive button message with up to 3 reply buttons to a WhatsApp user. Interactive button messages allow recipients to quickly respond by tapping predefined buttons. Perfect for yes/no questions, multiple choice selections, quick actions, or call-to-action scenarios. IMPORTANT REQUIREMENTS: - The recipient must be a registered WhatsApp user - The recipient must have messaged your business first within the last 24 hours (WhatsApp's customer service window) - You can include 1-3 buttons per message - Each button can have a title (max 20 chars) and unique ID (max 256 chars) Use cases: Customer service menus, appointment confirmations, feedback collection, product selections.

### Send interactive list

**Slug:** `WHATSAPP_SEND_INTERACTIVE_LIST`

Send an interactive list message to a WhatsApp number. List messages display a menu of options organized into sections. Users tap a button to view the list and select one option. Perfect for product catalogs, service menus, or guided workflows. Supports up to 10 sections with up to 10 items per section (100 total options). Note: Recipients must have messaged you first within the last 24 hours to receive this message.

### Send location

**Slug:** `WHATSAPP_SEND_LOCATION`

Send a location message with coordinates, name, and address to a WhatsApp user. This action allows you to share location information through WhatsApp Business API. The location message includes latitude/longitude coordinates, a location name, and address. Important: The recipient must have an active WhatsApp account. Additionally, you can only send free-form messages (like location messages) within the 24-hour customer service window after the recipient has initiated contact with your business. Outside this window, you must use approved message templates. Common error codes: - 133010: Recipient's phone number doesn't have a WhatsApp account - 131026: Message undeliverable (recipient may have blocked your business number) - 131047: Re-engagement message (outside 24-hour window, need to use template)

### Send media

**Slug:** `WHATSAPP_SEND_MEDIA`

Send a media message to a WhatsApp number. Note: The media will be delivered to the recipient only if they have texted first.

### Send media by

**Slug:** `WHATSAPP_SEND_MEDIA_BY_ID`

Send media using a media ID from previously uploaded media. This is more efficient than sending media by URL as the media is already on WhatsApp servers. Use upload_media action first to get the media ID. Note: The media will be delivered to the recipient only if they have texted first.

### Send message

**Slug:** `WHATSAPP_SEND_MESSAGE`

Send a text message to a WhatsApp user. Important: The recipient phone number must be registered on WhatsApp and must have initiated a conversation with your business within the last 24 hours, OR you must use a template message (see WHATSAPP_SEND_TEMPLATE_MESSAGE) for the first message outside the 24-hour window. For test accounts, recipient numbers must be added to the test recipient list in Meta Business Suite before sending messages.

### Send template message

**Slug:** `WHATSAPP_SEND_TEMPLATE_MESSAGE`

Send a template message to a WhatsApp number.

### Upload media

**Slug:** `WHATSAPP_UPLOAD_MEDIA`

Upload media files (images, videos, audio, documents, stickers) to WhatsApp servers. The uploaded media gets a media ID that can be used in send_media or other messaging actions. Supported formats: - Images: JPEG, PNG (max 5MB) - Videos: MP4, 3GPP (max 16MB) - Audio: AAC, M4A, AMR, MP3, OGG (max 16MB) - Documents: PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX (max 100MB) - Stickers: WebP (max 500KB, 512x512 pixels)


## Triggers

### Message Status Updated

**Slug:** `WHATSAPP_MESSAGE_STATUS_UPDATED_TRIGGER`

**Type:** poll

Triggers when a WhatsApp message status changes.

    IMPORTANT LIMITATION:
    WhatsApp Cloud API does not provide a native polling endpoint for message status.
    Status updates are ONLY delivered via webhooks in real-time. This trigger cannot
    directly poll the WhatsApp API for status updates.

    This trigger will return empty results as WhatsApp does not support this operation.
    To track message status updates, you must:
    1. Set up a webhook endpoint to receive status notifications from WhatsApp
    2. Store the webhook data in your own database
    3. Use a different mechanism to query your stored webhook data

    For more information, see:
    - https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `max_results` | integer | No | Maximum number of status updates to retrieve in each poll (1-100). |
| `phone_number_id` | string | Yes | The Meta-assigned numeric ID for the WhatsApp Business phone number to monitor. This is NOT the actual phone number itself - it is a numeric ID (e.g., '712594308615206') assigned by Meta. Obtain it using WHATSAPP_GET_PHONE_NUMBERS action which returns the 'id' field for each phone number. |
| `status_filter` | string | No | Optional: Filter by specific status. Valid values: 'sent', 'delivered', 'read', 'failed'. Leave empty to monitor all status changes. |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | No | Type of event that occurred |
| `phone_number_id` | string | Yes | The phone number ID that sent the message |
| `status_update` | object | Yes | The message status update information |
