# Send text message

In this method you will be able to send simple texts, you can add to them by using the [formatting of text](/help-desk/faq/whatsapp-text-formatting.md) and [emojis](/help-desk/sending/send-emoji.md).

To send a text message, you need to make a request to:&#x20;

`POST https://gate.whapi.cloud/messages/text`

### Attributes

#### Required <a href="#required" id="required"></a>

<table><thead><tr><th width="124">Attributes</th><th width="115" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>to</code></td><td align="center">string</td><td><a href="/pages/YzO9nWWQ31lbFxiQXI0R">Chat ID</a>: The recipient's phone number (or <a href="/pages/mUOKnNBulJCK5z0tDJh0">group</a> or <a href="/pages/MA1z4PoXH2JiCQqLtmZ4">channel </a>ID) in international format without a plus. For example <em>14046542567</em>. It is IMPORTANT to send only numbers without formatting or masking</td></tr><tr><td><code>body</code></td><td align="center">string</td><td>Text to be sent. Emoji 😃 characters are supported. It is required to use UTF-8 encoding without BOM. May include an https link.</td></tr></tbody></table>

#### Optional

<table><thead><tr><th width="219">Attributes</th><th width="141" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>quoted</code></td><td align="center">string</td><td>Message ID of the message to be quoted</td></tr><tr><td><code>edit</code></td><td align="center">string</td><td>Message ID of the message to be edited</td></tr><tr><td><code>typing_time</code></td><td align="center">number</td><td>Time in seconds to simulate typing</td></tr><tr><td><code>no_link_preview</code></td><td align="center">boolean</td><td>Set "true" if necessary to send the link without preview</td></tr><tr><td><code>mentions</code></td><td align="center">array of strings</td><td>Responsible for mentioning members in the group. <br><br>Specify numbers to mention here. <br><br><strong>Be sure to insert this mention in the</strong> <code>Body</code> <strong>text of the message you are sending.</strong> It should contain the @ symbol along with the number.<br><br>Read more here: <a data-mention href="/pages/dFtTua5PM9DOzQGZRhOM#mentioning-all-participants-in-a-whatsapp-group">/pages/dFtTua5PM9DOzQGZRhOM#mentioning-all-participants-in-a-whatsapp-group</a></td></tr><tr><td><code>view_once</code></td><td align="center">boolean</td><td>This message can only be viewed once</td></tr></tbody></table>

***

{% embed url="<https://whapi.readme.io/reference/sendmessagetext>" %}
Test requests and sample code snippets in any programming language
{% endembed %}

{% hint style="info" %}
Messages sent via the API appear in your WhatsApp as regular messages. You'll see them in your chat on your phone, in WhatsApp Web, or on Desktop—just as if you'd sent them manually. There's no difference for the recipient either.

If you need to understand where a message was sent from, you can look at the source field in the [webhook](/help-desk/receiving/webhooks/our-webhooks-tracked-events.md) or API response (e.g., "api," "mobile," or "web").
{% endhint %}

Y

#### Choose a programming language you are comfortable with:

\
[Whatsapp API send message PHP](/help-desk/sending/send-text-message/whatsapp-api-send-message-php.md)

[Whatsapp API send message Node JS](/help-desk/sending/send-text-message/whatsapp-api-send-message-node-js.md)

[Whatsapp API send message Python](/help-desk/sending/send-text-message/whatsapp-api-send-message-python.md)

[Whatsapp API send message Java](/help-desk/sending/send-text-message/whatsapp-api-send-message-java.md)

[Whatsapp API send message С#](/help-desk/sending/send-text-message/whatsapp-api-send-message-s.md)

{% embed url="<https://youtu.be/qlJW6rUycw8?si=dq5Tit7qswo0cveO>" %}
Send WhatsApp API Message
{% endembed %}

{% hint style="info" %}
If you have any inquiries, or if you'd like to share your experiences, please don't hesitate to get in touch: <care@whapi.cloud>
{% endhint %}

### Send Media Message

Additional endpoint for easy send media-file as message. Use request body as file and inpath parameters for send parameters. Media message can be one of the following types:

{% embed url="<https://whapi.readme.io/reference/sendmediamessage>" %}

### Send Image <a href="#send-image" id="send-image"></a>

{% embed url="<https://whapi.readme.io/reference/sendmessageimage>" %}

### Send Document <a href="#send-document" id="send-document"></a>

{% embed url="<https://whapi.readme.io/reference/sendmessagedocument>" %}

### Send Audio <a href="#send-audio" id="send-audio"></a>

{% embed url="<https://whapi.readme.io/reference/sendmessageaudio>" %}

### Send Voice <a href="#send-voice" id="send-voice"></a>

You can Send a ppt audio recording to the phone number or group, But WhatsApp is sensitive to this extension, you need to be in OGG format and the **codecs** should be the **opus**. Our API has an automatic video and audio converter for the necessary codecs compatible with WhatsApp. For more information, you can check out this [article](/help-desk/sending/overview-of-other-methods-for-sending/send-voice-message.md).

{% embed url="<https://whapi.readme.io/reference/sendmessagevoice>" %}

### Send Video <a href="#send-video" id="send-video"></a>

{% embed url="<https://whapi.readme.io/reference/sendmessagevideo>" %}

### Send GIF

{% embed url="<https://whapi.readme.io/reference/sendmessagegif>" %}

### Send Contact <a href="#send-contact" id="send-contact"></a>

{% embed url="<https://whapi.readme.io/reference/sendmessagecontact>" %}

### Send Contact List

{% embed url="<https://whapi.readme.io/reference/sendmessagecontactlist>" %}

### Send Location <a href="#send-location" id="send-location"></a>

{% embed url="<https://whapi.readme.io/reference/sendmessagelocation>" %}

### Send Sticker

{% embed url="<https://whapi.readme.io/reference/sendmessagesticker>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/sending/send-text-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
