--- title: "Send Transactional WhatsApp Media Message (Document)" slug: "send-transactional-whatsapp-media-message-document" description: "Documents the POST /v1/send endpoint for sending transactional WhatsApp document messages, covering supported file types, size limits, and body parameters." tags: ["send document via whatsapp api", "whatsapp api media message", "transactional whatsapp api"] updated: 2026-11-20T13:48:54Z published: 2026-11-20T13:48:54Z canonical: "academy.insiderone.com/send-transactional-whatsapp-media-message-document" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Send Transactional WhatsApp Media Message (Document) This API enables you to send targeted transactional WhatsApp messages to your users. You can send only document content in this message type. You can send this message type if the user has sent a message to your number in the last 24 hours. Refer to the visual below to see how the media message in the document type is displayed.![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/documenttype.png) ## Endpoint and Headers > **POST**https://whatsapp.useinsider.com/v1/send | Header | Sample Value | Description | | --- | --- | --- | | X-INS-AUTH-KEY | 1a2b3c4d5e6f | This key is required to authorize your request. Refer to [API Authentication Tokens](https://academy.insiderone.com/docs/api-authentication-tokens) to generate your token. | | Content-Type | application/json | This header specifies the media type of the resource. | ## Body parameters | Column | Description | Data Type | Required | | --- | --- | --- | --- | | messages | All messages are contained in the messages key. You can send multiple messages with a single request. | Array | Yes | | from | Specifies the sender phone number ID. Only required when multiple phone numbers are configured for the account. If not specified, the default phone number is used. This applies to both Transactional and Conversational WhatsApp APIs. | String | Optional | | phoneNumber | Phone number for the person you want to message. > [!WARNING] > The value of the phoneNumber must follow the E.164 format (e.g., +1234567). Each phone number must begin with a plus sign (**+**) followed by the country code. | String | Conditional. Required if recipient is not sent. | | recipient | Specifies the recipient’s **WhatsApp Business-Scoped User ID (BSUID)**. For example, TR.2124566744990207. Use this identifier to send messages without providing the recipient’s phone number. Pass the complete BSUID, including its country prefix. | String | Conditional. Required if phoneNumber is not provided. | | message | Message object | Object | Yes | | type | Must be a “document” for this message type. | String | Yes | | document | A media object of type document. | Object | Yes | | link | The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs. Supported file types: - text/plain, - application/pdf, - application/vnd.ms-powerpoint, - application/msword, - application/vnd.ms-excel, - application/vnd.openxmlformats-officedocument.wordprocessingml.document, - application/vnd.openxmlformats-officedocument.presentationml.presentation, - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Max 100 MB. | URL | Yes if there is no **id**. | | id | The media object ID. Do not use this field when the message type is set to text. | URL | Yes if there is no **link**. | | caption | Describes the specified image media. | String | No | | filename | Name of the file. | String | No | ### WhatsApp Status Callback The Status Callback allows you to track the delivery status of your WhatsApp messages in real time. When you send a message, the system sends status updates to the API URL you’ve specified in the callback parameter. If you don't respond with a status code between 200 and 300, the system automatically retries the request up to 10 times following this schedule: | Retry Attempt | Time After First Attempt | | --- | --- | | 1st retry | 1 minute | | 2nd retry | 2 minutes | | 3rd retry | 3 minutes | | 4th retry | 8 minutes | | 5th retry | 13 minutes | | 6th retry | 18 minutes | | 7th retry | 28 minutes | | 8th retry | 38 minutes | | 9th retry | 48 minutes | | 10th retry | 1 hour | ## Sample Request Below is a sample request to send a transactional WhatsApp document message with a caption and filename. ```bash curl --location 'https://whatsapp.useinsider.com/v1/send' \ --header 'Content-Type: application/json' \ --header 'x-ins-auth-key: INS.1a2b3c4d5e6f' \ --data '{    "messages": [        {            "phoneNumber": "+1**********",            "message": {                "type": "document",                "document": {                    "link": "{{DOCUMENT_LINK}}",                    "caption": "{{DOCUMENT_DESCRIPTION}}",                    "filename": "{{DOCUMENT_NAME}}"                }            }        }    ] }' ``` ## Sample Responses One key information will be returned for each message to be sent. This key will be added to all events related to the message. ```json {    "keys": [        "whatsapp-*************************"    ] } ``` ### 401 Unauthorized If you use the wrong key, you will see the following error. ```json {    "message": "unauthorized" } ``` ### 429 Rate Limit If you send more than 1000 requests per second, you will see the following error: ```json {    "message": "rate limited" } ``` ### 403 Forbidden This error occurs when Cloudflare’s security mechanisms block requests, acting as an additional protection layer for Insider’s infrastructure. As part of this setup, Insider complies with Cloudflare’s automated security policies. In certain cases, these mechanisms may block specific **User-Agent** values or IP addresses. If the client IP is denied or restricted, the API will return the following response: ```json { "message": "ip-restricted", "error": { "message": "ip-restricted", "code": 1088 } } ``` > [!WARNING] > **Notes**: > > - **403 Forbidden** error occurs when the IP address is not whitelisted for you. > - **Error code 1088** is specific to IP restriction errors. #### How to Troubleshoot a 403 Forbidden Error If you encounter a **403 Forbidden** error when making API requests, for example, through the **Conversational** or **Transactional API**, please check the following: - Verify the **User-Agent header** used in your HTTP client (especially default or empty values such as Java’s default `User-Agent`). - Review blocked requests under **Security** > **Events** in your Cloudflare dashboard to identify whether they were rejected due to User-Agent or WAF rules. > [!NOTE] > For more detailed troubleshooting guidance and Cloudflare’s official documentation, refer to the following resources: > > - [403 Error Troubleshooting Guide](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/4xx-client-error/error-403/) > - [User-Agent Blocking Documentation](https://developers.cloudflare.com/waf/tools/user-agent-blocking/) > - [Security Events (Firewall Events) Dashboard](https://developers.cloudflare.com/waf/analytics/security-events/) > - [WAF Troubleshooting FAQ](https://developers.cloudflare.com/waf/troubleshooting/faq/) ## Limitations - All functions must be executed with a simple **HTTPS POST** request. - Only new WhatsApp messages can be sent via this API. No data can be retrieved. - The **API Key** should be provided as the authorization key in the request header. If the key is incorrect, the operation will not be executed, and an authorization error will be returned in the response. - The rate limit is **1000 requests per second**. > The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team. We can adjust it to fit your needs. ## Related - [Send Transactional WhatsApp Template Message](/send-transactional-whatsapp-template-message.md) - [Send Transactional WhatsApp Text Message](/send-transactional-whatsapp-text-message.md) - [Send Transactional WhatsApp Message with Button Reply (Quick Reply)](/send-transactional-whatsapp-message-with-button-reply.md) - [Send Transactional WhatsApp Media Message (Image)](/send-transactional-whatsapp-media-message-image.md) - [Send Transactional WhatsApp Media Message (Location)](/send-transactional-whatsapp-media-message-location.md) - [API Authentication Tokens](/api-authentication-tokens.md) - [API Rate Limits](/api-rate-limits.md) - [API Status and Error Codes](/api-status-and-error-codes.md) - [Insider One APIs in Postman](/insider-apis-in-postman.md)