Marcar como leída
curl --request POST \
--url https://api.wegluu.com/v1/conversations/{id}/read \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegluu.com/v1/conversations/{id}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wegluu.com/v1/conversations/{id}/read"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "whatsapp",
"status": "active",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unread_count": 123,
"last_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"direction": "inbound",
"content": "<string>",
"timestamp": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"gluu": {
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contact_name": "<string>",
"phone_number": "<string>",
"business_scoped_user_id": "<string>",
"parent_business_scoped_user_id": "<string>",
"username": "<string>"
}
}{
"code": "unauthorized",
"message": "La clave de API no existe o fue revocada.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "forbidden",
"message": "Esta clave de API no tiene permiso para mandar mensajes.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "conversation_not_found",
"message": "No hay una conversación con ese id en este workspace.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "rate_limited",
"message": "Superaste el límite de 120 llamadas por minuto con esta clave.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}Conversaciones
Marcar como leída
Marca la conversación como leída hasta su último mensaje entrante: pone unread_count en 0 para todo el workspace, también en el inbox de Gluu. No lleva body y no cambia nada en el teléfono del contacto.
Requiere una clave full.
POST
/
conversations
/
{id}
/
read
Marcar como leída
curl --request POST \
--url https://api.wegluu.com/v1/conversations/{id}/read \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegluu.com/v1/conversations/{id}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wegluu.com/v1/conversations/{id}/read"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "whatsapp",
"status": "active",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unread_count": 123,
"last_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"direction": "inbound",
"content": "<string>",
"timestamp": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"gluu": {
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contact_name": "<string>",
"phone_number": "<string>",
"business_scoped_user_id": "<string>",
"parent_business_scoped_user_id": "<string>",
"username": "<string>"
}
}{
"code": "unauthorized",
"message": "La clave de API no existe o fue revocada.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "forbidden",
"message": "Esta clave de API no tiene permiso para mandar mensajes.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "conversation_not_found",
"message": "No hay una conversación con ese id en este workspace.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "rate_limited",
"message": "Superaste el límite de 120 llamadas por minuto con esta clave.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}