Enviar texto en una conversación de la bandeja
curl --request POST \
--url https://cloud.watahub.dev/v1/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>'})
};
fetch('https://cloud.watahub.dev/v1/conversations/{conversationId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.watahub.dev/v1/conversations/{conversationId}/messages"
payload = { "text": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"messageId": "<string>",
"recipient": "<string>",
"phoneNumberId": "<string>"
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}Referencia API
Enviar texto en una conversación de la bandeja
Enviar texto en una conversación de la bandeja
POST
/
v1
/
conversations
/
{conversationId}
/
messages
Enviar texto en una conversación de la bandeja
curl --request POST \
--url https://cloud.watahub.dev/v1/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>'})
};
fetch('https://cloud.watahub.dev/v1/conversations/{conversationId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.watahub.dev/v1/conversations/{conversationId}/messages"
payload = { "text": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"messageId": "<string>",
"recipient": "<string>",
"phoneNumberId": "<string>"
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}Autorizaciones
bearerApiKeyheaderApiKey
Clave API de la cuenta.
Parámetros de ruta
phoneNumberId:wa_id, con dos puntos literales.
Cuerpo
application/json
Required string length:
1 - 4096¿Esta página le ayudó?