curl --request PUT \
--url https://api.contractorscloud.com/api/v1/accounts/{accountId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rep_id": 1204,
"notes": "Prefers phone contact over email."
}
'import requests
url = "https://api.contractorscloud.com/api/v1/accounts/{accountId}"
payload = {
"rep_id": 1204,
"notes": "Prefers phone contact over email."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({rep_id: 1204, notes: 'Prefers phone contact over email.'})
};
fetch('https://api.contractorscloud.com/api/v1/accounts/{accountId}', 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.contractorscloud.com/api/v1/accounts/{accountId}",
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([
'rep_id' => 1204,
'notes' => 'Prefers phone contact over email.'
]),
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.contractorscloud.com/api/v1/accounts/{accountId}"
payload := strings.NewReader("{\n \"rep_id\": 1204,\n \"notes\": \"Prefers phone contact over email.\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.contractorscloud.com/api/v1/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rep_id\": 1204,\n \"notes\": \"Prefers phone contact over email.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rep_id\": 1204,\n \"notes\": \"Prefers phone contact over email.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 5340,
"tenant_id": 12,
"rep_id": 1204,
"created_by": 1159,
"type": 1,
"name": "Acme Construction",
"address_street": "890 Timber Ridge Rd",
"address_city": "Eau Claire",
"address_state": "WI",
"address_zip": "54701",
"address_latitude": "44.811300",
"address_longitude": "-91.498300",
"shipping_address_street": null,
"shipping_address_city": null,
"shipping_address_state": null,
"shipping_address_zip": null,
"notes": "Prefers phone contact over email.",
"is_taxable": true,
"is_portal_enabled": true,
"merge_status": 0,
"primary_prefix": 0,
"primary_first_name": null,
"primary_last_name": null,
"primary_title_id": null,
"primary_nick_name": null,
"primary_phone_home": null,
"primary_phone_work": null,
"primary_phone_work_ext": null,
"primary_phone_cell": null,
"primary_phone_fax": null,
"primary_email": null,
"secondary_prefix": 0,
"secondary_first_name": null,
"secondary_last_name": null,
"secondary_title_id": null,
"secondary_nick_name": null,
"secondary_phone_home": null,
"secondary_phone_work": null,
"secondary_phone_work_ext": null,
"secondary_phone_cell": null,
"secondary_phone_fax": null,
"secondary_email": null,
"tertiary_prefix": 0,
"tertiary_first_name": null,
"tertiary_last_name": null,
"tertiary_title_id": null,
"tertiary_nick_name": null,
"tertiary_phone_home": null,
"tertiary_phone_work": null,
"tertiary_phone_work_ext": null,
"tertiary_phone_cell": null,
"tertiary_phone_fax": null,
"tertiary_email": null,
"created_at": "2025-03-10 09:00:00",
"updated_at": "2025-03-10 09:15:00"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}{
"message": "The first name field is required.",
"errors": {
"first_name": [
"The first name field is required."
]
}
}Update account
Updates an existing account. Only the fields you send are changed; when present, type, name, and the primary address fields can’t be set to empty values. Depending on your permission level, an account outside your visible scope returns a 404 the same as a nonexistent one.
Request format
Accepts the same fields as Create account, all optional. The account’s primary_*, secondary_*, and tertiary_* contact fields aren’t set through this endpoint — they’re recomputed automatically from the account’s linked contacts every time the account is updated.
Side effects
A system-generated account note describing the changes is added automatically. If name changes, the customer name shown on the account’s projects is updated to match. If address_latitude and address_longitude are omitted and the account doesn’t already have coordinates, they’re derived automatically from the address.
curl --request PUT \
--url https://api.contractorscloud.com/api/v1/accounts/{accountId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rep_id": 1204,
"notes": "Prefers phone contact over email."
}
'import requests
url = "https://api.contractorscloud.com/api/v1/accounts/{accountId}"
payload = {
"rep_id": 1204,
"notes": "Prefers phone contact over email."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({rep_id: 1204, notes: 'Prefers phone contact over email.'})
};
fetch('https://api.contractorscloud.com/api/v1/accounts/{accountId}', 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.contractorscloud.com/api/v1/accounts/{accountId}",
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([
'rep_id' => 1204,
'notes' => 'Prefers phone contact over email.'
]),
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.contractorscloud.com/api/v1/accounts/{accountId}"
payload := strings.NewReader("{\n \"rep_id\": 1204,\n \"notes\": \"Prefers phone contact over email.\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.contractorscloud.com/api/v1/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rep_id\": 1204,\n \"notes\": \"Prefers phone contact over email.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rep_id\": 1204,\n \"notes\": \"Prefers phone contact over email.\"\n}"
response = http.request(request)
puts response.read_body{
"id": 5340,
"tenant_id": 12,
"rep_id": 1204,
"created_by": 1159,
"type": 1,
"name": "Acme Construction",
"address_street": "890 Timber Ridge Rd",
"address_city": "Eau Claire",
"address_state": "WI",
"address_zip": "54701",
"address_latitude": "44.811300",
"address_longitude": "-91.498300",
"shipping_address_street": null,
"shipping_address_city": null,
"shipping_address_state": null,
"shipping_address_zip": null,
"notes": "Prefers phone contact over email.",
"is_taxable": true,
"is_portal_enabled": true,
"merge_status": 0,
"primary_prefix": 0,
"primary_first_name": null,
"primary_last_name": null,
"primary_title_id": null,
"primary_nick_name": null,
"primary_phone_home": null,
"primary_phone_work": null,
"primary_phone_work_ext": null,
"primary_phone_cell": null,
"primary_phone_fax": null,
"primary_email": null,
"secondary_prefix": 0,
"secondary_first_name": null,
"secondary_last_name": null,
"secondary_title_id": null,
"secondary_nick_name": null,
"secondary_phone_home": null,
"secondary_phone_work": null,
"secondary_phone_work_ext": null,
"secondary_phone_cell": null,
"secondary_phone_fax": null,
"secondary_email": null,
"tertiary_prefix": 0,
"tertiary_first_name": null,
"tertiary_last_name": null,
"tertiary_title_id": null,
"tertiary_nick_name": null,
"tertiary_phone_home": null,
"tertiary_phone_work": null,
"tertiary_phone_work_ext": null,
"tertiary_phone_cell": null,
"tertiary_phone_fax": null,
"tertiary_email": null,
"created_at": "2025-03-10 09:00:00",
"updated_at": "2025-03-10 09:15:00"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}{
"message": "The first name field is required.",
"errors": {
"first_name": [
"The first name field is required."
]
}
}Authorizations
Body
Response
The updated account.