Update
Executes api/v1/accounts/chat_room_members#update.
PUT
/
api
/
v1
/
accounts
/
{account_id}
/
chat_rooms
/
{chat_room_id}
/
chat_room_members
/
{id}
Update
curl --request PUT \
--url https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"muted": true,
"favorited": true,
"hidden": true,
"role": "Sample text"
}
'const options = {
method: 'PUT',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({muted: true, favorited: true, hidden: true, role: 'Sample text'})
};
fetch('https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}"
payload = {
"muted": True,
"favorited": True,
"hidden": True,
"role": "Sample text"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}",
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([
'muted' => true,
'favorited' => true,
'hidden' => true,
'role' => 'Sample text'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$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://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}"
payload := strings.NewReader("{\n \"muted\": true,\n \"favorited\": true,\n \"hidden\": true,\n \"role\": \"Sample text\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api_access_token", "<api-key>")
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://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"muted\": true,\n \"favorited\": true,\n \"hidden\": true,\n \"role\": \"Sample text\"\n}")
.asString();{
"id": 1,
"member_id": 1,
"name": "Sample resource",
"email": "agent@example.com",
"availability_status": "open",
"role": "Sample text",
"muted": true,
"favorited": true,
"hidden": true,
"thumbnail": "Sample text",
"last_read_at": 1
}{
"error": "Unauthorized"
}{
"error": "Resource not found"
}{
"message": "Validation failed",
"attributes": [
"name cannot be blank"
]
}Autorizações
⌘I
Update
curl --request PUT \
--url https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"muted": true,
"favorited": true,
"hidden": true,
"role": "Sample text"
}
'const options = {
method: 'PUT',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({muted: true, favorited: true, hidden: true, role: 'Sample text'})
};
fetch('https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}"
payload = {
"muted": True,
"favorited": True,
"hidden": True,
"role": "Sample text"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}",
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([
'muted' => true,
'favorited' => true,
'hidden' => true,
'role' => 'Sample text'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$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://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}"
payload := strings.NewReader("{\n \"muted\": true,\n \"favorited\": true,\n \"hidden\": true,\n \"role\": \"Sample text\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api_access_token", "<api-key>")
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://chat.wiseapp360.com/api/v1/accounts/{account_id}/chat_rooms/{chat_room_id}/chat_room_members/{id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"muted\": true,\n \"favorited\": true,\n \"hidden\": true,\n \"role\": \"Sample text\"\n}")
.asString();{
"id": 1,
"member_id": 1,
"name": "Sample resource",
"email": "agent@example.com",
"availability_status": "open",
"role": "Sample text",
"muted": true,
"favorited": true,
"hidden": true,
"thumbnail": "Sample text",
"last_read_at": 1
}{
"error": "Unauthorized"
}{
"error": "Resource not found"
}{
"message": "Validation failed",
"attributes": [
"name cannot be blank"
]
}