Location Messages
Send geographic coordinates with an optional name and address. The recipient will see an interactive map pin in their WhatsApp chat.
Endpoint
POST
/api/messages/location
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone number with country code |
latitude | number | Yes | Latitude of the location (-90 to 90) |
longitude | number | Yes | Longitude of the location (-180 to 180) |
name | string | No | Name of the location (e.g., business name) |
address | string | No | Street address of the location |
phoneNumberId | string | No | Send from a specific number |
Example Request
{
"to": "15551234567",
"latitude": 37.4220936,
"longitude": -122.083922,
"name": "Meta Headquarters",
"address": "1 Hacker Way, Menlo Park, CA 94025"
}JSON
C# Example
var payload = new
{
to = "15551234567",
latitude = 37.4220936,
longitude = -122.083922,
name = "Meta Headquarters",
address = "1 Hacker Way, Menlo Park, CA 94025"
};
var json = JsonSerializer.Serialize(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://app.waconnect.me/api/messages/location", content);C#