Send WhatsApp Location Messages
Share precise locations instantly via the DoubleTick API, enabling seamless navigation and real-time customer engagement. π
API Endpoint
Use the following endpoint to send a location message:
POST https://public.doubletick.io/whatsapp/message/location
Request Headers
{
"Authorization": "YOUR_API_KEY",
"Content-Type": "application/json"
}
Request Body Parameters
{
"to": "customer_number",
"from": "sender_number",
"messageId": "uuid-v4",
"content": {
"latitude": 37.7749,
"longitude": -122.4194,
"name": "DoubleTick HQ",
"address": "123 Business St, San Francisco, CA"
}
}
Parameters
to
(string, required): Customerβs phone number in international format.from
(string, required): Your registered sender phone number in international format.messageId
(string, optional):- Message ID (UUID v4) to be used for the message.
- If not provided, a random UUID v4 will be generated automatically.
- Length to be exact 36 characters.
content
(object, required)latitude
(number, required): Latitude of the location.longitude
(number, required): Longitude of the location.name
(string, optional): Name of the location.address
(string, optional): Address details for better identification.
Responses
Success Response (201)
{
"status": "SENT",
"recipient": "customer_number",
"messageId": "unique_message_id"
}
Bad Request (400)
{
"message": "error_message",
"error": "Bad Request",
"statusCode": 400
}
Unauthorized (401)
{
"message": "Invalid public api key",
"error": "Unauthorized",
"statusCode": 401
}
Unprocessable Entity (422)
{
"message": "invalid file type for audio: text/html; charset=utf-8",
"error": "Unprocessable Entity",
"statusCode": 422
}
Best Practices
- Ensure latitude and longitude values are accurate and correctly formatted.
- Providing a meaningful location name and address improves user experience.
Updated 14 days ago
Whatβs Next
Explore more message types and enhance your WhatsApp communication with DoubleTick API