v1

latestOpenAPI 3.1.02026-07-1413113265.9 KB
message

send location

Send a location message to a contact or group chat. The location can include additional details like name, address and URL.

post/instances/{id}/client/action/send-location

Path parameters

idinteger required

The ID of the instance.

Request body

chatIdstring required

Chat ID <countrycode_short><usernumber>@c.us or @g.us for groups

latitudenumber float required

Latitude coordinate of the location

longitudenumber float required

Longitude coordinate of the location

firedandforgetboolean

Set to true to process the request asynchronously. Returns a reference UUID for polling via GET /instances/{id}/request/{reference}. Alias: faf

Example request

{
  "chatId": "50664083362@c.us",
  "latitude": 37.422,
  "longitude": -122.084,
  "options": {
    "name": "Googleplex",
    "address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
    "url": "http://google.com"
  }
}

Response

Successful operation

status'success' | 'error'
instanceIdstring

The ID of the instance

Example response

{
  "status": "success",
  "instanceId": "1",
  "data": {
    "_data": {
      "id": {
        "fromMe": true,
        "remote": "xxxxxxxxxxxx@c.us",
        "id": "XXXXXXXXXXXXXXXXXXXX",
        "self": "out",
        "_serialized": "true_xxxxxxxxxxxx@c.us_XXXXXXXXXXXXXXXXXXXX_out"
      },
      "type": "location",
      "location": {
        "latitude": 37.422,
        "longitude": -122.084,
        "name": "Googleplex",
        "address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
        "url": "http://google.com"
      },
      "t": 1738947027,
      "notifyName": "Contact Name"
    }
  }
}