Learn how to send a location message with coordinates using the Flow REST API
The endpoint for the text message and the location message are the same. The following is the example and its body parameters for the location message:
POST rest/v1/messages/EXAMPLE-853a-448f-9f91-ef397588ff87 HTTP/1.1
Host: api.flow.ai
Content-Type: application/json
Authorization: MY_MESSAGING_API_KEY
{
"payload": {
"type": "location",
"lat": "1232122422",
"long": "2433343343",
"title": "Example title",
"originator": {
"name": "John Doe",
"role": "external"
}
}
}
Location message parameters information
Parameter | Description | Type |
---|---|---|
traceId | A unique number to identify the message. Use this to verify the message delivery. Optional. | integer |
type | Indicates the message type. Should be location | string |
lat | Latitude of the location | string |
long | Longitude of the location | string |
title | Location title. Optional. | string |
lang | 2 letters language code in ISO format. Optional | string |
timezone | UTF timezone offset in hours. Optional | integer |
params | Others parameters. Optional. | object |