Update account
curl --request PATCH \
--url https://api.quiva.ai/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "US",
"company_name": "ACME Corporation Updated",
"address": "456 New St, Anytown, USA",
"website": "https://new-acme.com",
"phone_number": "+9876543210",
"region": "us-east-1",
"provider": "aws",
"cloud": true,
"hub": false
}
'import requests
url = "https://api.quiva.ai/accounts"
payload = {
"country": "US",
"company_name": "ACME Corporation Updated",
"address": "456 New St, Anytown, USA",
"website": "https://new-acme.com",
"phone_number": "+9876543210",
"region": "us-east-1",
"provider": "aws",
"cloud": True,
"hub": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'US',
company_name: 'ACME Corporation Updated',
address: '456 New St, Anytown, USA',
website: 'https://new-acme.com',
phone_number: '+9876543210',
region: 'us-east-1',
provider: 'aws',
cloud: true,
hub: false
})
};
fetch('https://api.quiva.ai/accounts', 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://api.quiva.ai/accounts",
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([
'country' => 'US',
'company_name' => 'ACME Corporation Updated',
'address' => '456 New St, Anytown, USA',
'website' => 'https://new-acme.com',
'phone_number' => '+9876543210',
'region' => 'us-east-1',
'provider' => 'aws',
'cloud' => true,
'hub' => false
]),
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://api.quiva.ai/accounts"
payload := strings.NewReader("{\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation Updated\",\n \"address\": \"456 New St, Anytown, USA\",\n \"website\": \"https://new-acme.com\",\n \"phone_number\": \"+9876543210\",\n \"region\": \"us-east-1\",\n \"provider\": \"aws\",\n \"cloud\": true,\n \"hub\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.quiva.ai/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation Updated\",\n \"address\": \"456 New St, Anytown, USA\",\n \"website\": \"https://new-acme.com\",\n \"phone_number\": \"+9876543210\",\n \"region\": \"us-east-1\",\n \"provider\": \"aws\",\n \"cloud\": true,\n \"hub\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation Updated\",\n \"address\": \"456 New St, Anytown, USA\",\n \"website\": \"https://new-acme.com\",\n \"phone_number\": \"+9876543210\",\n \"region\": \"us-east-1\",\n \"provider\": \"aws\",\n \"cloud\": true,\n \"hub\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "<string>",
"id": "<string>",
"display_name": "<string>",
"root_email": "jsmith@example.com",
"subscription_plan": "<string>",
"emergency_credit": 123,
"country": "<string>",
"company_name": "<string>",
"address": "<string>",
"website": "<string>",
"phone_number": "<string>",
"scheduled_for_deletion": true,
"deletion_date": "2023-11-07T05:31:56Z",
"region": "<string>",
"provider": "<string>",
"bstier": 123,
"cloud": true,
"hub": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}Account Management
Update account
Updates account information.
- An update can be made to any of the non-critical editable account properties only by root and admin users.
- Critical account properties such as name, ID, and root email address cannot be changed with this request
- To update name, see /accounts/rename
- To update root_email, see /accounts/request-email-address-change
PATCH
/
accounts
Update account
curl --request PATCH \
--url https://api.quiva.ai/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "US",
"company_name": "ACME Corporation Updated",
"address": "456 New St, Anytown, USA",
"website": "https://new-acme.com",
"phone_number": "+9876543210",
"region": "us-east-1",
"provider": "aws",
"cloud": true,
"hub": false
}
'import requests
url = "https://api.quiva.ai/accounts"
payload = {
"country": "US",
"company_name": "ACME Corporation Updated",
"address": "456 New St, Anytown, USA",
"website": "https://new-acme.com",
"phone_number": "+9876543210",
"region": "us-east-1",
"provider": "aws",
"cloud": True,
"hub": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: 'US',
company_name: 'ACME Corporation Updated',
address: '456 New St, Anytown, USA',
website: 'https://new-acme.com',
phone_number: '+9876543210',
region: 'us-east-1',
provider: 'aws',
cloud: true,
hub: false
})
};
fetch('https://api.quiva.ai/accounts', 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://api.quiva.ai/accounts",
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([
'country' => 'US',
'company_name' => 'ACME Corporation Updated',
'address' => '456 New St, Anytown, USA',
'website' => 'https://new-acme.com',
'phone_number' => '+9876543210',
'region' => 'us-east-1',
'provider' => 'aws',
'cloud' => true,
'hub' => false
]),
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://api.quiva.ai/accounts"
payload := strings.NewReader("{\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation Updated\",\n \"address\": \"456 New St, Anytown, USA\",\n \"website\": \"https://new-acme.com\",\n \"phone_number\": \"+9876543210\",\n \"region\": \"us-east-1\",\n \"provider\": \"aws\",\n \"cloud\": true,\n \"hub\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.quiva.ai/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation Updated\",\n \"address\": \"456 New St, Anytown, USA\",\n \"website\": \"https://new-acme.com\",\n \"phone_number\": \"+9876543210\",\n \"region\": \"us-east-1\",\n \"provider\": \"aws\",\n \"cloud\": true,\n \"hub\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"US\",\n \"company_name\": \"ACME Corporation Updated\",\n \"address\": \"456 New St, Anytown, USA\",\n \"website\": \"https://new-acme.com\",\n \"phone_number\": \"+9876543210\",\n \"region\": \"us-east-1\",\n \"provider\": \"aws\",\n \"cloud\": true,\n \"hub\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "<string>",
"id": "<string>",
"display_name": "<string>",
"root_email": "jsmith@example.com",
"subscription_plan": "<string>",
"emergency_credit": 123,
"country": "<string>",
"company_name": "<string>",
"address": "<string>",
"website": "<string>",
"phone_number": "<string>",
"scheduled_for_deletion": true,
"deletion_date": "2023-11-07T05:31:56Z",
"region": "<string>",
"provider": "<string>",
"bstier": 123,
"cloud": true,
"hub": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Account updated successfully
Show child attributes
Show child attributes
⌘I