GET/blog/whatsapp-api-link-wa-me—200OK
guideapi

WhatsApp API Link: wa.me and api.whatsapp.com/send Explained

November 23, 2026|4 min read

When people search for a "WhatsApp API link", they usually mean one of two things. Either they want a link that opens a chat with a number, such as https://wa.me/1234567890, or they want to send messages from code. These are different tools. The link opens a chat on the visitor's phone. An API sends the message for you. This guide covers how the link works, how to build it, and where it stops being enough.

The two link formats

WhatsApp's own "Click to Chat" feature gives you a short link:

link
https://wa.me/1234567890

The number goes after wa.me/ in full international format, with no zeros, brackets, dashes or +. If you open that address, WhatsApp redirects you to the longer form, which you will also see in the wild:

link
https://api.whatsapp.com/send?phone=1234567890

Both do the same thing. Neither one is an API in the programming sense: there is no key, no request body and no response. Opening the link launches WhatsApp, either the app on a phone or WhatsApp Web on a computer, with the chat to that number ready.

Add a prefilled message

You can place text in the message box so the visitor only has to press send. Add a text parameter, URL-encoded:

link
https://wa.me/1234567890?text=Hi%2C%20I%20want%20to%20know%20more

If you leave the number out and write https://wa.me/?text=..., WhatsApp asks the visitor to pick a contact first. That form is useful for share buttons.

Build the link in code

Encoding by hand is where most broken links come from. Let the language do it:

chat-link.js
function chatLink(number, text) {
  const clean = number.replace(/\D/g, "");
  const query = text ? `?text=${encodeURIComponent(text)}` : "";
  return `https://wa.me/${clean}${query}`;
}

console.log(chatLink("+1 234 567 890", "Hi, I want to know more"));
// https://wa.me/1234567890?text=Hi%2C%20I%20want%20to%20know%20more

The function strips everything that is not a digit from the number and encodes the text, which covers spaces, commas and accents.

What a link cannot do

A link is a way for a person to start a conversation with you. It has limits that matter as soon as you automate anything:

  • It sends nothing by itself. The visitor has to open WhatsApp and press send, so you cannot notify a customer about an order with a link.
  • You get no confirmation. There is no message ID, no status and no error to react to.
  • You cannot attach media. The link carries text only.
  • You cannot read replies. What the customer writes back never reaches your code.

If you only need a "chat with us" button on a website, the link is the right answer and it is free. If you need messages to go out without a person pressing a button, you need an API.

When to use an API instead

An API sends the message from your server. With WSAPI that is a single HTTP request, with no Meta Business verification and no template approval, because the instance is a regular WhatsApp account:

terminal
curl -X POST https://api.wsapi.chat/messages/text \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your-api-key" \
  -H "X-Instance-Id: your-instance-id" \
  -d '{"to": "1234567890@s.whatsapp.net", "text": "Your order has shipped."}'

A successful call returns 201 and the message ID. You can then receive the customer's answer through webhooks and build a chatbot on top. The cURL guide covers images, documents, replies and errors, and the quickstart shows how to pair a number in a few minutes. The free trial lasts 14 days with no credit card.

A common setup uses both: a wa.me link on your site so visitors can start a chat, and the API to answer and follow up from your systems.

FAQ

Is wa.me the same as api.whatsapp.com/send?

Yes. The short link redirects to the longer address with the same number and text.

Can I send a message from code with a wa.me link?

No. The link only opens a chat for a person to send. To send from code, use an API.

Does the number need a plus sign?

No. Use the full international number with digits only.

Can WhatsApp restrict my number?

WSAPI connects a regular WhatsApp account, so WhatsApp's usage policies apply and accounts that send unsolicited bulk messages can be limited.