Skip to main content
POST
Criar chat com template

Authorizations

Authorization
string
header
required

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

application/json
whatsapp_phone_id
string<uuid>
required
wa_contact_id
string
required
Maximum string length: 50
template
object
required
person_contact_id
string<uuid>
remote_profile_name
string | null
Maximum string length: 255
crm_person_id
string<uuid> | null
assigned_agent_id
string<uuid> | null
status
enum<string>
Available options:
OPEN,
RESOLVED,
SNOOZED
template_fields
object[]

Response

Operação realizada.

id
string<uuid>
required
wa_contact_id
string
required
contact_name
string
required
contact_number
string
required
status
enum<string>
required
Available options:
OPEN,
RESOLVED,
SNOOZED
chat_type
enum<string>
required
Available options:
INDIVIDUAL,
GROUP
unread_count
integer
required
is_manually_unread
boolean
required
priority
enum<integer>
required

0 = baixa, 1 = normal, 2 = alta, 3 = urgente.

Available options:
0,
1,
2,
3
can_send_open_message
boolean
required

Indica se a janela atual permite mensagem aberta.

channel_type
enum<string>
required
Available options:
WHATSAPP
channel_account_id
string<uuid>
required
archived_at
string<date-time> | null
assigned_agent_id
string<uuid> | null
phone_number
object
assigned_agent
object | null
last_message_at
string<date-time> | null
last_message
object | null
crm_person
object | null
last_customer_msg_at
string<date-time> | null
session_expires_at
string<date-time> | null
has_pending_copilot_actions
boolean
pending_copilot_actions_count
integer
has_active_whatsapp_flow_session
boolean
active_whatsapp_flow_sessions
object[]
has_upcoming_scheduled_message
boolean

Presente na listagem; indica agendamento futuro.

channel_account
object
external_contact
object
legacy
object
ai_attendance
object | null

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.