Update a message
Update a message
PUT
/
public
/
api
/
v1
/
inboxes
/
{inbox_identifier}
/
contacts
/
{contact_identifier}
/
conversations
/
{conversation_id}
/
messages
/
{message_id}
Update a message
curl --request PUT \
--url https://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id} \
--header 'Content-Type: application/json' \
--data '
{
"submitted_values": {
"name": "My Name",
"title": "My Title",
"value": "value",
"csat_survey_response": {
"feedback_message": "Great service!",
"rating": 5
}
}
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
submitted_values: {
name: 'My Name',
title: 'My Title',
value: 'value',
csat_survey_response: {feedback_message: 'Great service!', rating: 5}
}
})
};
fetch('https://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}"
payload = { "submitted_values": {
"name": "My Name",
"title": "My Title",
"value": "value",
"csat_survey_response": {
"feedback_message": "Great service!",
"rating": 5
}
} }
headers = {"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/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_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([
'submitted_values' => [
'name' => 'My Name',
'title' => 'My Title',
'value' => 'value',
'csat_survey_response' => [
'feedback_message' => 'Great service!',
'rating' => 5
]
]
]),
CURLOPT_HTTPHEADER => [
"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://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}"
payload := strings.NewReader("{\n \"submitted_values\": {\n \"name\": \"My Name\",\n \"title\": \"My Title\",\n \"value\": \"value\",\n \"csat_survey_response\": {\n \"feedback_message\": \"Great service!\",\n \"rating\": 5\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}")
.header("Content-Type", "application/json")
.body("{\n \"submitted_values\": {\n \"name\": \"My Name\",\n \"title\": \"My Title\",\n \"value\": \"value\",\n \"csat_survey_response\": {\n \"feedback_message\": \"Great service!\",\n \"rating\": 5\n }\n }\n}")
.asString();{
"id": 1,
"content": "Sample text",
"message_type": 1,
"content_type": "Sample text",
"content_attributes": {
"source": "api",
"segment": "enterprise"
},
"created_at": 1,
"conversation_id": 1,
"attachments": [
{
"id": 1,
"message_id": 1,
"file_type": "image",
"account_id": 1,
"extension": "Sample text",
"data_url": "https://example.com/resource",
"thumb_url": "https://example.com/resource",
"file_size": 1,
"width": 1,
"height": 1,
"coordinates_lat": 1,
"coordinates_long": 1
}
],
"sender": {
"id": 1,
"name": "Sample resource",
"avatar_url": "https://example.com/resource",
"thumbnail": "Sample text",
"type": "contact",
"available_name": "Sample resource",
"availability_status": "open",
"email": "agent@example.com",
"phone_number": "+15551234567",
"identifier": "Sample text",
"blocked": true,
"additional_attributes": {
"source": "api",
"segment": "enterprise"
}
}
}{
"error": "Unauthorized"
}Parâmetros de caminho
Resposta
Success
⌘I
Update a message
curl --request PUT \
--url https://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id} \
--header 'Content-Type: application/json' \
--data '
{
"submitted_values": {
"name": "My Name",
"title": "My Title",
"value": "value",
"csat_survey_response": {
"feedback_message": "Great service!",
"rating": 5
}
}
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
submitted_values: {
name: 'My Name',
title: 'My Title',
value: 'value',
csat_survey_response: {feedback_message: 'Great service!', rating: 5}
}
})
};
fetch('https://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}"
payload = { "submitted_values": {
"name": "My Name",
"title": "My Title",
"value": "value",
"csat_survey_response": {
"feedback_message": "Great service!",
"rating": 5
}
} }
headers = {"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/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_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([
'submitted_values' => [
'name' => 'My Name',
'title' => 'My Title',
'value' => 'value',
'csat_survey_response' => [
'feedback_message' => 'Great service!',
'rating' => 5
]
]
]),
CURLOPT_HTTPHEADER => [
"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://chat.wiseapp360.com/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}"
payload := strings.NewReader("{\n \"submitted_values\": {\n \"name\": \"My Name\",\n \"title\": \"My Title\",\n \"value\": \"value\",\n \"csat_survey_response\": {\n \"feedback_message\": \"Great service!\",\n \"rating\": 5\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages/{message_id}")
.header("Content-Type", "application/json")
.body("{\n \"submitted_values\": {\n \"name\": \"My Name\",\n \"title\": \"My Title\",\n \"value\": \"value\",\n \"csat_survey_response\": {\n \"feedback_message\": \"Great service!\",\n \"rating\": 5\n }\n }\n}")
.asString();{
"id": 1,
"content": "Sample text",
"message_type": 1,
"content_type": "Sample text",
"content_attributes": {
"source": "api",
"segment": "enterprise"
},
"created_at": 1,
"conversation_id": 1,
"attachments": [
{
"id": 1,
"message_id": 1,
"file_type": "image",
"account_id": 1,
"extension": "Sample text",
"data_url": "https://example.com/resource",
"thumb_url": "https://example.com/resource",
"file_size": 1,
"width": 1,
"height": 1,
"coordinates_lat": 1,
"coordinates_long": 1
}
],
"sender": {
"id": 1,
"name": "Sample resource",
"avatar_url": "https://example.com/resource",
"thumbnail": "Sample text",
"type": "contact",
"available_name": "Sample resource",
"availability_status": "open",
"email": "agent@example.com",
"phone_number": "+15551234567",
"identifier": "Sample text",
"blocked": true,
"additional_attributes": {
"source": "api",
"segment": "enterprise"
}
}
}{
"error": "Unauthorized"
}