Enviar presença no chat WhatsApp
curl --request POST \
--url https://api.notifique.dev/v1/whatsapp/messages/presence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instanceId": "inst_abc",
"to": "5511999999999",
"presence": "composing"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({instanceId: 'inst_abc', to: '5511999999999', presence: 'composing'})
};
fetch('https://api.notifique.dev/v1/whatsapp/messages/presence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/whatsapp/messages/presence"
payload = {
"instanceId": "inst_abc",
"to": "5511999999999",
"presence": "composing"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/whatsapp/messages/presence"
payload := strings.NewReader("{\n \"instanceId\": \"inst_abc\",\n \"to\": \"5511999999999\",\n \"presence\": \"composing\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"ok": true
}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}Mensagens
Enviar presença no chat WhatsApp
Avisa que você está digitando ou gravando áudio em uma conversa.
POST
/
v1
/
whatsapp
/
messages
/
presence
Enviar presença no chat WhatsApp
curl --request POST \
--url https://api.notifique.dev/v1/whatsapp/messages/presence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instanceId": "inst_abc",
"to": "5511999999999",
"presence": "composing"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({instanceId: 'inst_abc', to: '5511999999999', presence: 'composing'})
};
fetch('https://api.notifique.dev/v1/whatsapp/messages/presence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/whatsapp/messages/presence"
payload = {
"instanceId": "inst_abc",
"to": "5511999999999",
"presence": "composing"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/whatsapp/messages/presence"
payload := strings.NewReader("{\n \"instanceId\": \"inst_abc\",\n \"to\": \"5511999999999\",\n \"presence\": \"composing\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"ok": true
}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"note": "<string>"
}Autorizações
ntfWaBearerAuthntfWaApiKeyHeader
API Key no header Authorization. Exemplo: Authorization: Bearer sk_live_xxxxx
Corpo
application/json
ID da instância WhatsApp do workspace
Telefone E.164 ou JID (@s.whatsapp.net / @g.us)
composing = digitando; recording = gravando áudio
Opções disponíveis:
composing, recording Reservado para uso futuro; ignorado na v1
Esta página foi útil?
⌘I

