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

Request

  • Base URL: https://waapi.app/api/v1
  • URL: https://waapi.app/api/v1/instances/{id}/client/action/send-location
  • Auth: HTTP bearer

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

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation. Payload: Successful operation.

status'success' | 'error'

Whether the request reached the instance. success here does not mean the action was carried out — that is reported by data.status, which is the authoritative one. A malformed input arrives as status: success with data.status: error.

Example response

{
  "status": "success",
  "data": {
    "status": "success",
    "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"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.