chat
React to a message
Idempotent. Reacting twice with the same emoji changes nothing.
POST
/
api
/
chat
/
messages
/
{id}
/
reactions
React to a message
curl --request POST \
--url https://client-api.lala.ist/api/chat/messages/{id}/reactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emoji": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({emoji: '<string>'})
};
fetch('https://client-api.lala.ist/api/chat/messages/{id}/reactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://client-api.lala.ist/api/chat/messages/{id}/reactions"
payload = { "emoji": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": {
"id": "<string>",
"role": "user",
"content": "<string>",
"media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "image",
"mimeType": "<string>",
"sizeBytes": 0,
"width": 0,
"height": 0,
"durationMs": 0,
"fileName": "<string>",
"status": "pending",
"url": "<string>",
"urlExpiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"reactions": [
{
"emoji": "<string>",
"actor": "user",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"replyTo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "user",
"content": "<string>",
"mediaKind": "image"
},
"turnIndex": 0,
"cursor": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}React to a message
curl --request POST \
--url https://client-api.lala.ist/api/chat/messages/{id}/reactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"emoji": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({emoji: '<string>'})
};
fetch('https://client-api.lala.ist/api/chat/messages/{id}/reactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://client-api.lala.ist/api/chat/messages/{id}/reactions"
payload = { "emoji": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": {
"id": "<string>",
"role": "user",
"content": "<string>",
"media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "image",
"mimeType": "<string>",
"sizeBytes": 0,
"width": 0,
"height": 0,
"durationMs": 0,
"fileName": "<string>",
"status": "pending",
"url": "<string>",
"urlExpiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"reactions": [
{
"emoji": "<string>",
"actor": "user",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"replyTo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "user",
"content": "<string>",
"mediaKind": "image"
},
"turnIndex": 0,
"cursor": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}