Account
Update account
Update account details, settings, and custom attributes
PATCH
/
api
/
v1
/
accounts
/
{id}
Update account
curl --request PATCH \
--url https://app.clickdesk.openclick.ai/api/v1/accounts/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": false,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
'import requests
url = "https://app.clickdesk.openclick.ai/api/v1/accounts/{id}"
payload = {
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": False,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Account',
locale: 'en',
domain: 'example.com',
support_email: 'support@example.com',
auto_resolve_after: 1440,
auto_resolve_message: 'This conversation has been automatically resolved due to inactivity',
auto_resolve_ignore_waiting: false,
industry: 'Technology',
company_size: '50-100',
timezone: 'UTC'
})
};
fetch('https://app.clickdesk.openclick.ai/api/v1/accounts/{id}', 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://app.clickdesk.openclick.ai/api/v1/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Account',
'locale' => 'en',
'domain' => 'example.com',
'support_email' => 'support@example.com',
'auto_resolve_after' => 1440,
'auto_resolve_message' => 'This conversation has been automatically resolved due to inactivity',
'auto_resolve_ignore_waiting' => false,
'industry' => 'Technology',
'company_size' => '50-100',
'timezone' => 'UTC'
]),
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://app.clickdesk.openclick.ai/api/v1/accounts/{id}"
payload := strings.NewReader("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.clickdesk.openclick.ai/api/v1/accounts/{id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.clickdesk.openclick.ai/api/v1/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"locale": "<string>",
"domain": "<string>",
"support_email": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"cache_keys": {},
"features": [
"<string>"
],
"settings": {
"auto_resolve_after": 123,
"auto_resolve_message": "<string>",
"auto_resolve_ignore_waiting": true
},
"custom_attributes": {
"plan_name": "<string>",
"subscribed_quantity": 123,
"subscription_status": "<string>",
"subscription_ends_on": "2023-12-25",
"industry": "<string>",
"company_size": "<string>",
"timezone": "<string>",
"logo": "<string>",
"onboarding_step": "<string>",
"marked_for_deletion_at": "2023-11-07T05:31:56Z",
"marked_for_deletion_reason": "<string>"
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Body
application/jsonapplication/x-www-form-urlencoded
Response
Success
⌘I
Update account
curl --request PATCH \
--url https://app.clickdesk.openclick.ai/api/v1/accounts/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": false,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
'import requests
url = "https://app.clickdesk.openclick.ai/api/v1/accounts/{id}"
payload = {
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": False,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Account',
locale: 'en',
domain: 'example.com',
support_email: 'support@example.com',
auto_resolve_after: 1440,
auto_resolve_message: 'This conversation has been automatically resolved due to inactivity',
auto_resolve_ignore_waiting: false,
industry: 'Technology',
company_size: '50-100',
timezone: 'UTC'
})
};
fetch('https://app.clickdesk.openclick.ai/api/v1/accounts/{id}', 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://app.clickdesk.openclick.ai/api/v1/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Account',
'locale' => 'en',
'domain' => 'example.com',
'support_email' => 'support@example.com',
'auto_resolve_after' => 1440,
'auto_resolve_message' => 'This conversation has been automatically resolved due to inactivity',
'auto_resolve_ignore_waiting' => false,
'industry' => 'Technology',
'company_size' => '50-100',
'timezone' => 'UTC'
]),
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://app.clickdesk.openclick.ai/api/v1/accounts/{id}"
payload := strings.NewReader("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.clickdesk.openclick.ai/api/v1/accounts/{id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.clickdesk.openclick.ai/api/v1/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"locale": "<string>",
"domain": "<string>",
"support_email": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"cache_keys": {},
"features": [
"<string>"
],
"settings": {
"auto_resolve_after": 123,
"auto_resolve_message": "<string>",
"auto_resolve_ignore_waiting": true
},
"custom_attributes": {
"plan_name": "<string>",
"subscribed_quantity": 123,
"subscription_status": "<string>",
"subscription_ends_on": "2023-12-25",
"industry": "<string>",
"company_size": "<string>",
"timezone": "<string>",
"logo": "<string>",
"onboarding_step": "<string>",
"marked_for_deletion_at": "2023-11-07T05:31:56Z",
"marked_for_deletion_reason": "<string>"
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
