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

ParameterDescriptionType
traceIdA unique number to identify the message. Use this to verify the message delivery. Optional.integer
typeIndicates the message type. Should be locationstring
latLatitude of the locationstring
longLongitude of the locationstring
titleLocation title. Optional.string
lang2 letters language code in ISO format. Optionalstring
timezoneUTF timezone offset in hours. Optionalinteger
paramsOthers parameters. Optional.object