curl --request POST \
--url https://api.wegly.com.br/integrations/external/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"whatsapp_phone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>",
"template": {
"name": "<string>",
"language": "<string>"
},
"person_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remote_profile_name": "<string>",
"crm_person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_fields": [
{
"value": "<string>",
"index": 123,
"button_index": 123,
"card_index": 123
}
]
}
'import requests
url = "https://api.wegly.com.br/integrations/external/chats"
payload = {
"whatsapp_phone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>",
"template": {
"name": "<string>",
"language": "<string>"
},
"person_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remote_profile_name": "<string>",
"crm_person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_fields": [
{
"value": "<string>",
"index": 123,
"button_index": 123,
"card_index": 123
}
]
}
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({
whatsapp_phone_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
wa_contact_id: '<string>',
template: {name: '<string>', language: '<string>'},
person_contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
remote_profile_name: '<string>',
crm_person_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assigned_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
template_fields: [{value: '<string>', index: 123, button_index: 123, card_index: 123}]
})
};
fetch('https://api.wegly.com.br/integrations/external/chats', 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",
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([
'whatsapp_phone_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'wa_contact_id' => '<string>',
'template' => [
'name' => '<string>',
'language' => '<string>'
],
'person_contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'remote_profile_name' => '<string>',
'crm_person_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assigned_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'template_fields' => [
[
'value' => '<string>',
'index' => 123,
'button_index' => 123,
'card_index' => 123
]
]
]),
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"
payload := strings.NewReader("{\n \"whatsapp_phone_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"wa_contact_id\": \"<string>\",\n \"template\": {\n \"name\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"person_contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"remote_profile_name\": \"<string>\",\n \"crm_person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_fields\": [\n {\n \"value\": \"<string>\",\n \"index\": 123,\n \"button_index\": 123,\n \"card_index\": 123\n }\n ]\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"whatsapp_phone_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"wa_contact_id\": \"<string>\",\n \"template\": {\n \"name\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"person_contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"remote_profile_name\": \"<string>\",\n \"crm_person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_fields\": [\n {\n \"value\": \"<string>\",\n \"index\": 123,\n \"button_index\": 123,\n \"card_index\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wegly.com.br/integrations/external/chats")
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 \"whatsapp_phone_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"wa_contact_id\": \"<string>\",\n \"template\": {\n \"name\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"person_contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"remote_profile_name\": \"<string>\",\n \"crm_person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_fields\": [\n {\n \"value\": \"<string>\",\n \"index\": 123,\n \"button_index\": 123,\n \"card_index\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>",
"contact_name": "<string>",
"contact_number": "<string>",
"status": "OPEN",
"chat_type": "INDIVIDUAL",
"unread_count": 123,
"is_manually_unread": true,
"priority": 0,
"can_send_open_message": true,
"channel_type": "WHATSAPP",
"channel_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_number": "<string>"
},
"assigned_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
}
},
"last_message_at": "2023-11-07T05:31:56Z",
"last_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "text",
"origin": "INBOUND",
"from_me": true,
"sent_via": "CONTACT",
"status": "processing",
"body_text": "<string>",
"content_payload": {},
"reactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emoji": "<string>",
"actor": "CONTACT",
"reactor_wa_id": "<string>",
"reactor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
],
"meta_timestamp": "2023-11-07T05:31:56Z",
"is_history": true,
"history_phase": 123,
"history_chunk_order": 123,
"history_progress": 123,
"is_media_placeholder": true,
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
}
},
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
},
"crm_marketing_lead_source": [
{}
],
"transcription": "<string>",
"is_forwarded": true,
"whatsapp_ai_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"crm_person": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"last_customer_msg_at": "2023-11-07T05:31:56Z",
"session_expires_at": "2023-11-07T05:31:56Z",
"has_pending_copilot_actions": true,
"pending_copilot_actions_count": 123,
"has_active_whatsapp_flow_session": true,
"active_whatsapp_flow_sessions": [
{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_name": "<string>",
"status": "ACTIVE",
"status_label": "<string>",
"is_active": true,
"started_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"current_step": {
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
},
"journey": {
"completed_steps": [
{
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
],
"current_step": {
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
},
"upcoming_steps": [
{
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
]
}
}
],
"has_upcoming_scheduled_message": true,
"channel_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"display_name": "<string>",
"provider_status": "<string>"
},
"external_contact": {
"id": "<string>",
"handle": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"legacy": {
"whatsapp_chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_phone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>"
},
"ai_attendance": {
"state": "AI",
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"profile_name": "<string>"
},
"since": "2023-11-07T05:31:56Z",
"end_reason": "TRANSFER_RULE",
"transferred_to": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}
}Criar chat com template
Cria ou reutiliza um chat WhatsApp e envia o template inicial. Informe wa_contact_id ou person_contact_id. assigned_agent_id é ID do agente, não do usuário. A rota não recebe arquivos: mídia de cabeçalho do template deve ser informada por URL. Permissão da chave: crm/chats.create. O acesso também respeita a empresa e as permissões do usuário criador da chave.
curl --request POST \
--url https://api.wegly.com.br/integrations/external/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"whatsapp_phone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>",
"template": {
"name": "<string>",
"language": "<string>"
},
"person_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remote_profile_name": "<string>",
"crm_person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_fields": [
{
"value": "<string>",
"index": 123,
"button_index": 123,
"card_index": 123
}
]
}
'import requests
url = "https://api.wegly.com.br/integrations/external/chats"
payload = {
"whatsapp_phone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>",
"template": {
"name": "<string>",
"language": "<string>"
},
"person_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remote_profile_name": "<string>",
"crm_person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_fields": [
{
"value": "<string>",
"index": 123,
"button_index": 123,
"card_index": 123
}
]
}
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({
whatsapp_phone_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
wa_contact_id: '<string>',
template: {name: '<string>', language: '<string>'},
person_contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
remote_profile_name: '<string>',
crm_person_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assigned_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
template_fields: [{value: '<string>', index: 123, button_index: 123, card_index: 123}]
})
};
fetch('https://api.wegly.com.br/integrations/external/chats', 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",
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([
'whatsapp_phone_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'wa_contact_id' => '<string>',
'template' => [
'name' => '<string>',
'language' => '<string>'
],
'person_contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'remote_profile_name' => '<string>',
'crm_person_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assigned_agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'template_fields' => [
[
'value' => '<string>',
'index' => 123,
'button_index' => 123,
'card_index' => 123
]
]
]),
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"
payload := strings.NewReader("{\n \"whatsapp_phone_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"wa_contact_id\": \"<string>\",\n \"template\": {\n \"name\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"person_contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"remote_profile_name\": \"<string>\",\n \"crm_person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_fields\": [\n {\n \"value\": \"<string>\",\n \"index\": 123,\n \"button_index\": 123,\n \"card_index\": 123\n }\n ]\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"whatsapp_phone_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"wa_contact_id\": \"<string>\",\n \"template\": {\n \"name\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"person_contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"remote_profile_name\": \"<string>\",\n \"crm_person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_fields\": [\n {\n \"value\": \"<string>\",\n \"index\": 123,\n \"button_index\": 123,\n \"card_index\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wegly.com.br/integrations/external/chats")
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 \"whatsapp_phone_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"wa_contact_id\": \"<string>\",\n \"template\": {\n \"name\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"person_contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"remote_profile_name\": \"<string>\",\n \"crm_person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_fields\": [\n {\n \"value\": \"<string>\",\n \"index\": 123,\n \"button_index\": 123,\n \"card_index\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>",
"contact_name": "<string>",
"contact_number": "<string>",
"status": "OPEN",
"chat_type": "INDIVIDUAL",
"unread_count": 123,
"is_manually_unread": true,
"priority": 0,
"can_send_open_message": true,
"channel_type": "WHATSAPP",
"channel_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_number": "<string>"
},
"assigned_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
}
},
"last_message_at": "2023-11-07T05:31:56Z",
"last_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "text",
"origin": "INBOUND",
"from_me": true,
"sent_via": "CONTACT",
"status": "processing",
"body_text": "<string>",
"content_payload": {},
"reactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emoji": "<string>",
"actor": "CONTACT",
"reactor_wa_id": "<string>",
"reactor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
],
"meta_timestamp": "2023-11-07T05:31:56Z",
"is_history": true,
"history_phase": 123,
"history_chunk_order": 123,
"history_progress": 123,
"is_media_placeholder": true,
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
}
},
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avatar": "<string>"
},
"crm_marketing_lead_source": [
{}
],
"transcription": "<string>",
"is_forwarded": true,
"whatsapp_ai_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"crm_person": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"last_customer_msg_at": "2023-11-07T05:31:56Z",
"session_expires_at": "2023-11-07T05:31:56Z",
"has_pending_copilot_actions": true,
"pending_copilot_actions_count": 123,
"has_active_whatsapp_flow_session": true,
"active_whatsapp_flow_sessions": [
{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"flow_name": "<string>",
"status": "ACTIVE",
"status_label": "<string>",
"is_active": true,
"started_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"current_step": {
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
},
"journey": {
"completed_steps": [
{
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
],
"current_step": {
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
},
"upcoming_steps": [
{
"node_id": "<string>",
"node_key": "<string>",
"name": "<string>",
"status": "<string>",
"status_label": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
]
}
}
],
"has_upcoming_scheduled_message": true,
"channel_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"display_name": "<string>",
"provider_status": "<string>"
},
"external_contact": {
"id": "<string>",
"handle": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"legacy": {
"whatsapp_chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_phone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wa_contact_id": "<string>"
},
"ai_attendance": {
"state": "AI",
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"profile_name": "<string>"
},
"since": "2023-11-07T05:31:56Z",
"end_reason": "TRANSFER_RULE",
"transferred_to": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}
}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.
Body
- Option 1
- Option 2
50Show child attributes
Show child attributes
255OPEN, RESOLVED, SNOOZED Show child attributes
Show child attributes
Response
Operação realizada.
OPEN, RESOLVED, SNOOZED INDIVIDUAL, GROUP 0 = baixa, 1 = normal, 2 = alta, 3 = urgente.
0, 1, 2, 3 Indica se a janela atual permite mensagem aberta.
WHATSAPP Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Presente na listagem; indica agendamento futuro.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Presente nos registros de WhatsApp da listagem; null quando a conversa nunca teve agente de IA ou o recurso está desativado. Não faz parte da criação nem dos detalhes.
Show child attributes
Show child attributes
