Otro tipo de Mensaje

Mensajes de Contacto

Ejemplo de Envio

El formato de request es JSON

POST /toolbox/api/whatsapp/v1/{API_KEY}/message

Authorization: Bearer {AUTH_TOKEN}
Content-Type: application/json

{
        "to": "recipient-wa-id",
        "type": "contacts",
        "contacts":
        [
                {
                "addresses": [
                    {
                        "city": "Menlo Park",
                        "country": "United States",
                        "country_code": "us",
                        "state": "CA",
                        "street": "1 Hacker Way",
                        "type": "HOME",
                        "zip": "94025"
                    },
                    {
                        "city": "Menlo Park",
                        "country": "United States",
                        "country_code": "us",
                        "state": "CA",
                        "street": "200 Jefferson Dr",
                        "type": "WORK",
                        "zip": "94025"
                    }
                ],
                "birthday": "2012-08-18",
                "emails": [
                    {
                        "email": "[email protected]",
                        "type": "WORK"
                    },
                    {
                        "email": "[email protected]",
                        "type": "WORK"
                    }
                ],
                "name": {
                    "first_name": "John",
                    "formatted_name": "John Smith",
                    "last_name": "Smith"
                },
                "org": {
                    "company": "WhatsApp",
                    "department": "Design",
                    "title": "Manager"
                },
                "phones": [
                    {
                        "phone": "+1 (940) 555-1234",
                        "type": "HOME"
                    },
                    {
                        "phone": "+1 (650) 555-1234",
                        "type": "WORK",
                        "wa_id": "16505551234"
                    }
                ],
                "urls": [
                    {
                        "url": "https://www.facebook.com",
                        "type": "WORK"
                    }
                ]
            }
        ]
    }

NombreRequeridoDescripción
addressesNoFull contact address(es)
birthdayNoYYYY-MM-DD formatted string
emailsNoContact email address(es)
nameNoFull contact name
orgNoContact organization information
phonesNoContact phone number(s)
urlsNoContact URL(s)

The addresses object

NombreRequeridoDescripción
streetNoStreet number and name
cityNoCity name
stateNoState abbreviation
zipNoZIP code
countryNoFull country name
country_codeNoTwo-letter country abbreviation
typeNoStandard Values: HOME, WORK

The emails object

NombreRequeridoDescripción
emailNoEmail address
typeNoStandard Values: HOME, WORK

The name object

NombreRequeridoDescripción
formatted_nameNoFull name as it normally appears
first_nameOptionalFirst name
last_nameOptionalLast name
middle_nameOptionalMiddle name
suffixOptionalName suffix
prefixOptionalName preffix

The org object

NombreRequeridoDescripción
companyNoName of the contact’s company
departmentNoName of the contact’s department
titleOptionalContact’s business title
#The phone object

The phone object

NombreRequeridoDescripción
phoneNoAutomatically populated with the wa_id value as a formatted phone number.
typeNoStandard Values: CELL, MAIN, IPHONE, HOME, WORK
wa_idNoWhatsApp ID

The urls object

NombreRequeridoDescripción
urlNoURL
typeNoStandard Values: HOME, WORK

TIP

For the objects which contain a type field, the values listed are simply considered the standard values that might be seen, however, you may set the field to any descriptive value you choose.

{
  "messages": [
    {
      "id": "message-id"
    }
  ]
}

Mensaje Contacto

Ejemplo de Envio

El formato de request es JSON

POST /toolbox/api/whatsapp/v1/{API_KEY}/message


Authorization: Bearer {AUTH_TOKEN}

Content-Type: application/json


{
    "to": "recipient-wa-id",
    "type": "location",
    "location":{
        "longitude": -122.425332,
        "latitude": 37.758056,
        "Facebook HQ",
        "address": "1 Hacker Way, Menlo Park, CA 94025"
    }
}

Parametros

NombreRequeridoDescripción
longitudeYesLongitude of the location
latitudeYesLatitude of the location
nameNoName of the location
addressNoAddress of the location. Only displayed if name is present.
{
  "messages": [
    {
      "id": "message-id"
    }
  ]
}