update a message
curl --request PUT \
--url https://apix.us.amity.co/api/v3/messages/{messageId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"text": "<string>"
},
"metadata": {},
"tags": [
"<string>"
],
"mentionees": [
{
"userIds": [
"<string>"
]
}
]
}
'import requests
url = "https://apix.us.amity.co/api/v3/messages/{messageId}"
payload = {
"data": { "text": "<string>" },
"metadata": {},
"tags": ["<string>"],
"mentionees": [{ "userIds": ["<string>"] }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {text: '<string>'},
metadata: {},
tags: ['<string>'],
mentionees: [{userIds: ['<string>']}]
})
};
fetch('https://apix.us.amity.co/api/v3/messages/{messageId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apix.us.amity.co/api/v3/messages/{messageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'text' => '<string>'
],
'metadata' => [
],
'tags' => [
'<string>'
],
'mentionees' => [
[
'userIds' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apix.us.amity.co/api/v3/messages/{messageId}"
payload := strings.NewReader("{\n \"data\": {\n \"text\": \"<string>\"\n },\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mentionees\": [\n {\n \"userIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apix.us.amity.co/api/v3/messages/{messageId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"text\": \"<string>\"\n },\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mentionees\": [\n {\n \"userIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v3/messages/{messageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"text\": \"<string>\"\n },\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mentionees\": [\n {\n \"userIds\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"messages": [
{
"_id": "<string>",
"path": "<string>",
"messageId": "<string>",
"channelId": "<string>",
"userId": "<string>",
"data": {},
"channelSegment": 123,
"parentId": "<string>",
"fileId": "<string>",
"tags": [
"<string>"
],
"metadata": {},
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"childrenNumber": 123,
"reactionsCount": 123,
"reactions": {},
"myReactions": [
"<string>"
],
"latestReaction": {
"referenceId": "<string>",
"referenceType": "<string>",
"reactionName": "<string>",
"userId": "<string>",
"userDisplayName": "<string>",
"reactionId": "<string>",
"eventName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"mentionees": [
{
"userIds": [
"<string>"
],
"userPublicIds": [
"<string>"
],
"userInternalIds": [
"<string>"
]
}
]
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"isDeleted": true
}
],
"files": [
{
"fileId": "<string>",
"fileUrl": "<string>",
"accessType": "public",
"altText": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attributes": {
"name": "<string>",
"extension": "<string>",
"size": 123,
"mimeType": "<string>",
"metadata": {
"exif": {},
"gps": {},
"height": 123,
"width": 123,
"isFull": true
}
}
}
]
}Message
update a message
PUT
/
api
/
v3
/
messages
/
{messageId}
update a message
curl --request PUT \
--url https://apix.us.amity.co/api/v3/messages/{messageId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"text": "<string>"
},
"metadata": {},
"tags": [
"<string>"
],
"mentionees": [
{
"userIds": [
"<string>"
]
}
]
}
'import requests
url = "https://apix.us.amity.co/api/v3/messages/{messageId}"
payload = {
"data": { "text": "<string>" },
"metadata": {},
"tags": ["<string>"],
"mentionees": [{ "userIds": ["<string>"] }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {text: '<string>'},
metadata: {},
tags: ['<string>'],
mentionees: [{userIds: ['<string>']}]
})
};
fetch('https://apix.us.amity.co/api/v3/messages/{messageId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apix.us.amity.co/api/v3/messages/{messageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'text' => '<string>'
],
'metadata' => [
],
'tags' => [
'<string>'
],
'mentionees' => [
[
'userIds' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apix.us.amity.co/api/v3/messages/{messageId}"
payload := strings.NewReader("{\n \"data\": {\n \"text\": \"<string>\"\n },\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mentionees\": [\n {\n \"userIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apix.us.amity.co/api/v3/messages/{messageId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"text\": \"<string>\"\n },\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mentionees\": [\n {\n \"userIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v3/messages/{messageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"text\": \"<string>\"\n },\n \"metadata\": {},\n \"tags\": [\n \"<string>\"\n ],\n \"mentionees\": [\n {\n \"userIds\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"messages": [
{
"_id": "<string>",
"path": "<string>",
"messageId": "<string>",
"channelId": "<string>",
"userId": "<string>",
"data": {},
"channelSegment": 123,
"parentId": "<string>",
"fileId": "<string>",
"tags": [
"<string>"
],
"metadata": {},
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"childrenNumber": 123,
"reactionsCount": 123,
"reactions": {},
"myReactions": [
"<string>"
],
"latestReaction": {
"referenceId": "<string>",
"referenceType": "<string>",
"reactionName": "<string>",
"userId": "<string>",
"userDisplayName": "<string>",
"reactionId": "<string>",
"eventName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"mentionees": [
{
"userIds": [
"<string>"
],
"userPublicIds": [
"<string>"
],
"userInternalIds": [
"<string>"
]
}
]
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"isDeleted": true
}
],
"files": [
{
"fileId": "<string>",
"fileUrl": "<string>",
"accessType": "public",
"altText": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attributes": {
"name": "<string>",
"extension": "<string>",
"size": 123,
"mimeType": "<string>",
"metadata": {
"exif": {},
"gps": {},
"height": 123,
"width": 123,
"isFull": true
}
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Maximum string length:
150Body
application/json
Information of message to be updated
⌘I