Enviar mensagem em grupos
curl --request POST \
--url https://api.notifique.dev/v1/whatsapp/groups/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groupJids": [
"120363@g.us"
],
"type": "text",
"text": "Olá grupo!",
"from": "inst_abc"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({groupJids: ['120363@g.us'], type: 'text', text: 'Olá grupo!', from: 'inst_abc'})
};
fetch('https://api.notifique.dev/v1/whatsapp/groups/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/whatsapp/groups/messages"
payload = {
"groupJids": ["120363@g.us"],
"type": "text",
"text": "Olá grupo!",
"from": "inst_abc"
}
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/groups/messages"
payload := strings.NewReader("{\n \"groupJids\": [\n \"120363@g.us\"\n ],\n \"type\": \"text\",\n \"text\": \"Olá grupo!\",\n \"from\": \"inst_abc\"\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": {
"messageIds": [
"msg_abc"
]
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Grupos
Enviar mensagem em grupos
Envia mensagem para um ou mais grupos por JID. Mesmo payload de /v1/whatsapp/messages, com groupJids. Rota legada; prefira o equivalente em /instances/{instanceId}/....
POST
/
v1
/
whatsapp
/
groups
/
messages
Enviar mensagem em grupos
curl --request POST \
--url https://api.notifique.dev/v1/whatsapp/groups/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groupJids": [
"120363@g.us"
],
"type": "text",
"text": "Olá grupo!",
"from": "inst_abc"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({groupJids: ['120363@g.us'], type: 'text', text: 'Olá grupo!', from: 'inst_abc'})
};
fetch('https://api.notifique.dev/v1/whatsapp/groups/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/whatsapp/groups/messages"
payload = {
"groupJids": ["120363@g.us"],
"type": "text",
"text": "Olá grupo!",
"from": "inst_abc"
}
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/groups/messages"
payload := strings.NewReader("{\n \"groupJids\": [\n \"120363@g.us\"\n ],\n \"type\": \"text\",\n \"text\": \"Olá grupo!\",\n \"from\": \"inst_abc\"\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": {
"messageIds": [
"msg_abc"
]
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Autorizações
ntfWaBearerAuthntfWaApiKeyHeader
API Key no header Authorization. Exemplo: Authorization: Bearer sk_live_xxxxx
Corpo
application/json
Esta página foi útil?

