Sinalizar digitação
curl --request POST \
--url https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_typing": true,
"reference_wamid": "<string>"
}
'import requests
url = "https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing"
payload = {
"is_typing": True,
"reference_wamid": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_typing: true, reference_wamid: '<string>'})
};
fetch('https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'is_typing' => true,
'reference_wamid' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing"
payload := strings.NewReader("{\n \"is_typing\": true,\n \"reference_wamid\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_typing\": true,\n \"reference_wamid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_typing\": true,\n \"reference_wamid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_typing": true,
"reference_wamid": "<string>",
"dispatched_at": "2023-11-07T05:31:56Z"
}Chats
Sinalizar digitação
WhatsApp. is_typing=true utiliza uma mensagem inbound das últimas 24 horas: informe reference_wamid ou permita localizar a mais recente elegível. is_typing=false retorna confirmação local sem novo envio à Meta e com reference_wamid=null. Permissão da chave: crm/chats.write. O acesso também respeita a empresa e as permissões do usuário criador da chave.
POST
/
integrations
/
external
/
chats
/
{id}
/
messages
/
typing
Sinalizar digitação
curl --request POST \
--url https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_typing": true,
"reference_wamid": "<string>"
}
'import requests
url = "https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing"
payload = {
"is_typing": True,
"reference_wamid": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_typing: true, reference_wamid: '<string>'})
};
fetch('https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'is_typing' => true,
'reference_wamid' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing"
payload := strings.NewReader("{\n \"is_typing\": true,\n \"reference_wamid\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_typing\": true,\n \"reference_wamid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wegly.com.br/integrations/external/chats/{id}/messages/typing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_typing\": true,\n \"reference_wamid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_typing": true,
"reference_wamid": "<string>",
"dispatched_at": "2023-11-07T05:31:56Z"
}Authorizations
Chave de integração com prefixo wegly_, enviada em Authorization: Bearer . Não é JWT. A chave deve estar ativa, não excluída e dentro da validade. Com allowed_domain, Origin (ou Referer na ausência de Origin) precisa informar o hostname permitido. A empresa e as permissões são obtidas pela chave.
Path Parameters
UUID da conversa.
