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

Parameter

Description

Type

traceId

Optional unique number that is passed along to identify the message. Use this to verify message delivery.

integer

type

Indicates the type of message. Should be location

string

lat

Latitude

string

long

Longitude

string

title

Optional title of location

string

lang

Optional language code in ISO format (2 letters)

string

timezone

Optional UTF timezone offset in hours

integer

params

Optional parameters

object