# 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](https://support.whapi.cloud/help-desk/faq/whatsapp-text-formatting) and [emojis](https://support.whapi.cloud/help-desk/sending/send-emoji).

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="../faq/chat-id.-what-is-it-and-how-to-get-it">Chat ID</a>: The recipient's phone number (or <a href="send-group-message">group</a> or <a href="send-post-to-whatsapp-channel">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="../../groups/send-group-message/mentioning-all-participants-in-a-whatsapp-group#mentioning-all-participants-in-a-whatsapp-group">#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 %}

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

\
[whatsapp-api-send-message-php](https://support.whapi.cloud/help-desk/sending/send-text-message/whatsapp-api-send-message-php "mention")

[whatsapp-api-send-message-node-js](https://support.whapi.cloud/help-desk/sending/send-text-message/whatsapp-api-send-message-node-js "mention")

[whatsapp-api-send-message-python](https://support.whapi.cloud/help-desk/sending/send-text-message/whatsapp-api-send-message-python "mention")

[whatsapp-api-send-message-java](https://support.whapi.cloud/help-desk/sending/send-text-message/whatsapp-api-send-message-java "mention")

[whatsapp-api-send-message-s](https://support.whapi.cloud/help-desk/sending/send-text-message/whatsapp-api-send-message-s "mention")

{% 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](https://support.whapi.cloud/help-desk/sending/overview-of-other-methods-for-sending/send-voice-message).

{% 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>" %}
