Update user profile
Update the user profile details
PUT
/
api
/
v1
/
profile
Update user profile
curl --request PUT \
--url https://chat.wiseapp360.com/api/v1/profile \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "Sample resource",
"email": "agent@example.com",
"password": "Sample text",
"password_confirmation": "Sample text",
"display_name": "Sample resource",
"account_id": 1,
"availability": "online",
"auto_offline": true,
"message_signature": "Sample text"
}
'const options = {
method: 'PUT',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sample resource',
email: 'agent@example.com',
password: 'Sample text',
password_confirmation: 'Sample text',
display_name: 'Sample resource',
account_id: 1,
availability: 'online',
auto_offline: true,
message_signature: 'Sample text'
})
};
fetch('https://chat.wiseapp360.com/api/v1/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/api/v1/profile"
payload = {
"name": "Sample resource",
"email": "agent@example.com",
"password": "Sample text",
"password_confirmation": "Sample text",
"display_name": "Sample resource",
"account_id": 1,
"availability": "online",
"auto_offline": True,
"message_signature": "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/profile",
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([
'name' => 'Sample resource',
'email' => 'agent@example.com',
'password' => 'Sample text',
'password_confirmation' => 'Sample text',
'display_name' => 'Sample resource',
'account_id' => 1,
'availability' => 'online',
'auto_offline' => true,
'message_signature' => '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/profile"
payload := strings.NewReader("{\n \"name\": \"Sample resource\",\n \"email\": \"agent@example.com\",\n \"password\": \"Sample text\",\n \"password_confirmation\": \"Sample text\",\n \"display_name\": \"Sample resource\",\n \"account_id\": 1,\n \"availability\": \"online\",\n \"auto_offline\": true,\n \"message_signature\": \"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/profile")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sample resource\",\n \"email\": \"agent@example.com\",\n \"password\": \"Sample text\",\n \"password_confirmation\": \"Sample text\",\n \"display_name\": \"Sample resource\",\n \"account_id\": 1,\n \"availability\": \"online\",\n \"auto_offline\": true,\n \"message_signature\": \"Sample text\"\n}")
.asString();{
"id": 1,
"access_token": "Sample text",
"account_id": 1,
"available_name": "Sample resource",
"avatar_url": "https://example.com/resource",
"confirmed": true,
"display_name": "Sample resource",
"message_signature": "Sample text",
"email": "agent@example.com",
"hmac_identifier": "Sample text",
"inviter_id": 1,
"name": "Sample resource"
}{
"error": "Unauthorized"
}Autorizações
Corpo
application/json
Resposta
Success
⌘I
Update user profile
curl --request PUT \
--url https://chat.wiseapp360.com/api/v1/profile \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "Sample resource",
"email": "agent@example.com",
"password": "Sample text",
"password_confirmation": "Sample text",
"display_name": "Sample resource",
"account_id": 1,
"availability": "online",
"auto_offline": true,
"message_signature": "Sample text"
}
'const options = {
method: 'PUT',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sample resource',
email: 'agent@example.com',
password: 'Sample text',
password_confirmation: 'Sample text',
display_name: 'Sample resource',
account_id: 1,
availability: 'online',
auto_offline: true,
message_signature: 'Sample text'
})
};
fetch('https://chat.wiseapp360.com/api/v1/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://chat.wiseapp360.com/api/v1/profile"
payload = {
"name": "Sample resource",
"email": "agent@example.com",
"password": "Sample text",
"password_confirmation": "Sample text",
"display_name": "Sample resource",
"account_id": 1,
"availability": "online",
"auto_offline": True,
"message_signature": "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/profile",
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([
'name' => 'Sample resource',
'email' => 'agent@example.com',
'password' => 'Sample text',
'password_confirmation' => 'Sample text',
'display_name' => 'Sample resource',
'account_id' => 1,
'availability' => 'online',
'auto_offline' => true,
'message_signature' => '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/profile"
payload := strings.NewReader("{\n \"name\": \"Sample resource\",\n \"email\": \"agent@example.com\",\n \"password\": \"Sample text\",\n \"password_confirmation\": \"Sample text\",\n \"display_name\": \"Sample resource\",\n \"account_id\": 1,\n \"availability\": \"online\",\n \"auto_offline\": true,\n \"message_signature\": \"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/profile")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sample resource\",\n \"email\": \"agent@example.com\",\n \"password\": \"Sample text\",\n \"password_confirmation\": \"Sample text\",\n \"display_name\": \"Sample resource\",\n \"account_id\": 1,\n \"availability\": \"online\",\n \"auto_offline\": true,\n \"message_signature\": \"Sample text\"\n}")
.asString();{
"id": 1,
"access_token": "Sample text",
"account_id": 1,
"available_name": "Sample resource",
"avatar_url": "https://example.com/resource",
"confirmed": true,
"display_name": "Sample resource",
"message_signature": "Sample text",
"email": "agent@example.com",
"hmac_identifier": "Sample text",
"inviter_id": 1,
"name": "Sample resource"
}{
"error": "Unauthorized"
}