Send your first WhatsApp Message

In this WhatsApp Business API Quickstart, you'll learn how to send a new WhatsApp message to a WhatsApp user using Programmable Conversations.

Step 1: Send your first WhatsApp message

First, you need to collect your live API key from the MessageBird Developer Dashboard and your Channel-ID from your Channel Directory.

Let's now enter your credentials, WhatsApp Channel-ID, and mobile number to the code snippet below:

curl -X "POST" "https://conversations.messagebird.com/v1/send" \
-H "Authorization: AccessKey YOUR-API-KEY" \
-H "Content-Type: application/json" \
--data '{
"to": "+31XXXXXXXXX",
"from": "WHATSAPP-CHANNEL-ID",
"type": "text",
"content": {
"text": "Hello!",
"disableUrlPreview": false
}
}'

Once your credentials are entered, go ahead and copy the above snippet to your terminal and hit enter!

Note: If you would like to disable URL preview (only available in text messages) you should set the value of disableUrlPreview to true. Default is false.

Step 2: View the response

Now, let's view the MessageBird’s HTTP response to your API call. If the set up was correct, you'll receive a response similar to this:

{
"id": "24500a370c86916fe8aef77e4c24b6a6",
"status": "accepted",
"fallback": null
}

If something went wrong, you’ll receive an error response from the MessageBird API. Don't worry, simply head over to Troubleshooting WhatsApp to understand the error.

Congrats! You can now send WhatsApp messages with Programmable Conversations using cURL.

Questions?

We’re always happy to help with code or other doubts you might have! Check out our Quickstarts, API Reference, Tutorials, SDKs, or contact our Support team.

Cookie Settings