How it works

You POST a small JSON body to your send endpoint. WAGHL creates the outbound message in the contact's GHL conversation, and GHL then sends it out over WhatsApp through the normal flow — the same path a message typed in GHL follows.

The contact must already exist in GHL The API sends to a contact in your GHL sub-account. If the number isn't a contact yet, create it in GHL first (or let an inbound message create it), then send.

1. Find your endpoint

Which URL you POST to depends on the WhatsApp gateway your sub-account is on. To check: in GHL, go to Settings → Phone Numbers → Advanced Setting and note the provider.

ProviderEndpoint URL
WhatsApp Gateway 1https://app1.waghl.com/public/wa-send.php
WA1 Connectorhttps://wa1.waconnector.com/public/wa-send.php
WA2 Connectorhttps://wa2.waconnector.com/public/wa-send.php
Use the endpoint that matches your gateway Sending to the wrong gateway's URL won't reach your device. If you're not sure which one you're on, check the Advanced Setting above or ask support.

2. Get your API key

Every send needs your sub-account's API key, which identifies the account you're sending from. To find it, an admin opens the WAGHL admin panel and:

1

Open the sub-account's users

Go to Sub-accounts, find the account, and open Users.

2

Open the view

Click the view icon in the Action column for the user.

3

Copy the API Key

The key is shown under API Key. Copy it — you'll paste it into your request.

Rotating the key If a key is ever exposed, click Regenerate Key on the same screen. The old key stops working immediately, so update it everywhere you've used it.

3. Send a message

Make a POST request with a JSON body. Set Content-Type: application/json.

Text message

POST https://wa1.waconnector.com/public/wa-send.php
Content-Type: application/json

{
  "api_key": "YOUR_API_KEY",
  "number":  "919876543210",
  "message": "Hello from the API 👋"
}
FieldRequiredWhat it is
api_keyYesYour sub-account API key (from step 2)
numberYesRecipient's WhatsApp number, digits with country code, no + (e.g. 919876543210)
messageYes*The text to send. *Optional if you're sending media.
media_typeNoimage, video, audio, or document
urlNoPublic URL of the media file. Required when media_type is set.

Sending media

To send an image, video, audio, or document, add media_type and a public url. The message then becomes an optional caption.

{
  "api_key": "YOUR_API_KEY",
  "number":  "919876543210",
  "message": "Here's the brochure",
  "media_type": "document",
  "url": "https://example.com/files/brochure.pdf"
}
The media URL must be publicly reachable WAGHL fetches the file from the url you provide, so it can't be behind a login or on a private network. If the file won't load in an incognito browser tab, it won't send.

4. Read the response

A successful request returns 200 with the GHL message it created:

{
  "success": true,
  "message": "Outbound message processed",
  "messageId": "6tL0MldX02XrtkLGq9Cr",
  "locationId": "APKKX7aJ2XUy4BezKrlz"
}
"Processed" means queued to send, not yet delivered messageId is the GHL conversation message. The actual WhatsApp send happens a moment later, asynchronously, when GHL fires it out over your connected number — so the response confirms the message was accepted and recorded, not that WhatsApp has delivered it yet.

If something's wrong, you get a 4xx with a reason:

{
  "success": false,
  "message": "Contact not found for this number in GHL. The contact must exist before sending."
}

How API sends look in GHL

Messages sent through the API carry a small ☑️via API tag in the GHL conversation, so you can tell them apart from messages typed in GHL or sent from a phone. The tag is only visible inside GHL — the WhatsApp recipient sees clean text without it.

Troubleshooting

ResponseWhat to check
"Contact not found for this number in GHL" The number isn't a contact in that sub-account yet. Create it in GHL first, then send. Make sure the number format matches (country code, no +).
Invalid or missing API key Re-copy the key from the admin panel (step 2). If it was regenerated, the old key no longer works — update it in your request.
Message accepted but never arrives on WhatsApp Confirm the sub-account's WhatsApp number is connected, and that you're posting to the correct gateway endpoint for that account.
Media doesn't send The url must be publicly downloadable and media_type must be set. Test the URL in an incognito tab.
Empty request / 400 Set Content-Type: application/json and send a valid JSON body. A malformed body is read as empty.

What's next?