Referência/Legacy - Messages/legacySendTextMessage
Legacy - Messages

Envia texto pelo alias legado

Envia texto pelo alias legado

Deprecated
POSThttp://localhost:8084/message/sendText/{instanceName}

Autenticação

InstanceBearerobrigatório

JWT HS256 da própria instância.

Header
Authorization
Exemplo
Bearer <INSTANCE_TOKEN>

Parâmetros

instanceNamepathobrigatório
string

Nome público da instância na rota legada ou no segundo segmento de logout

minLength 1

Request body

obrigatório
bodyoneOf
Exemplo: {"number":"5511999999999","textMessage":{"text":"Olá!"}}
numberstring

Telefone ou JID do destinatário

chatstring

Alias de destinatário

recipientstring

Alias de destinatário

textMessageobjectobrigatório
textstringobrigatóriominLength: 1 · maxLength: 65536
optionsobject
delayintegermín: 0 · máx: 120000
presenceenum<composing | recording | paused>
quotedMessageIdstring
quotedMessageobject
externalAttributesobject
mentionAllbooleanpadrão: false
opção 1any
opção 2any
opção 3any
Exemplo JSONgerado do schema
{
"number": "5511999999999",
"textMessage": {
"text": "Olá!"
}
}

Respostas

application/json
200

Mensagem enviada

response 200object
idintegerobrigatório
keyIdstringobrigatório
keyRemoteJidstring | nullobrigatório
keyLidstring | nullobrigatório
keyFromMebooleanobrigatório
keyParticipantstring | nullobrigatório
keyParticipantLidstring | nullobrigatório
pushNamestring | nullobrigatório
messageTypestringobrigatório
contentanyobrigatório
messageTimestampintegerobrigatório
deviceenum<ios | android | web | unknown | desktop>obrigatório
isGroupboolean | nullobrigatório
instanceIdintegerobrigatório
metadataany
externalAttributesobject
Exemplo 200gerado do schema
{
"id": 1,
"keyId": "string",
"keyRemoteJid": "[email protected]",
"keyLid": "string",
"keyFromMe": true,
"keyParticipant": "string",
"keyParticipantLid": "string",
"pushName": "CodeChat",
"messageType": "Olá! Esta é uma mensagem de exemplo da CodeChat.",
"content": "string",
"messageTimestamp": 1,
"device": "ios",
"isGroup": true,
"instanceId": 1,
"metadata": "string",
"externalAttributes": {}
}