Learn how to send a location message with coordinates using the Flow REST API

The endpoint for the text message and the location message is the same. The body parameters for the location message are as follows:

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

ParameterDescriptionType
traceIdOptional unique number that is passed along to identify the message. Use this to verify message delivery.integer
typeIndicates the type of message. Should be locationstring
latLatitudestring
longLongitudestring
titleOptional title of locationstring
langOptional language code in ISO format (2 letters)string
timezoneOptional UTF timezone offset in hoursinteger
paramsOptional parametersobject