Accounts

Base URL: https://api.cornerspot.net

Authentication: requests use a bearer token, for example Authorization: Bearer YOUR_API_KEY.

List an account's notes

GET /c/api/v1/accounts/{account_id}/notes

Returns a paginated list of notes for a given account, ordered by pinned (desc) then created_at (desc). Requires the accounts_read scope and the CRM module.

Path parameters

FIELDTYPEDESCRIPTION
account_idstring · requiredAccount id.

Query parameters

FIELDTYPEDESCRIPTION
pageinteger1-based page number.
per_pageintegerPage size (1–100, default 25).

Code samples

curl --request GET \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123/notes"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="GET")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123/notes")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKa page of notes for the account
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan does not include CRM
403 Forbiddenthe key lacks the accounts_read scope
404 Not Foundno such account in this team

Add a note to an account

POST /c/api/v1/accounts/{account_id}/notes

Creates a note on the account. Requires accounts_write.

Path parameters

FIELDTYPEDESCRIPTION
account_idstring · requiredAccount id.

Request body

FIELDTYPEDESCRIPTION
noteobject
note.bodystring · requiredRequired — the note body.
note.titlestring
note.pinnedboolean
note.tag_ids[]array of string

Code samples

curl --request POST \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "note": {
    "body": "string",
    "title": "string",
    "pinned": true,
    "tag_ids": [
      "abc123"
    ]
  }
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "note": {
      "body": "string",
      "title": "string",
      "pinned": true,
      "tag_ids": [
        "abc123"
      ]
    }
  })
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "note": {
      "body": "string",
      "title": "string",
      "pinned": true,
      "tag_ids": [
        "abc123"
      ]
    }
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123/notes"
payload = json.dumps({
  "note": {
    "body": "string",
    "title": "string",
    "pinned": true,
    "tag_ids": [
      "abc123"
    ]
  }
}).encode("utf-8")
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, data=payload, headers=headers, method="POST")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123/notes")

request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
  "note": {
    "body": "string",
    "title": "string",
    "pinned": true,
    "tag_ids": [
      "abc123"
    ]
  }
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_POSTFIELDS => json_encode([
    'note' => [
        'body' => 'string',
        'title' => 'string',
        'pinned' => true,
        'tag_ids' => [
            'abc123',
        ],
    ],
]),
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
201 Createdcreated
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan does not include CRM
403 Forbiddenthe key lacks the accounts_write scope
404 Not Foundno such account in this team
422 Unprocessable Contentvalidation errors (e.g. missing required body)

Get a note on an account

GET /c/api/v1/accounts/{account_id}/notes/{id}

Path parameters

FIELDTYPEDESCRIPTION
account_idstring · requiredAccount id.
idstring · requiredNote id.

Code samples

curl --request GET \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="GET")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKthe note
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan does not include CRM
403 Forbiddenthe key lacks the accounts_read scope
404 Not Foundno such note

Delete a note on an account

DELETE /c/api/v1/accounts/{account_id}/notes/{id}

Soft-deletes the note. Returns 204 No Content on success.

Path parameters

FIELDTYPEDESCRIPTION
account_idstring · requiredAccount id.
idstring · requiredNote id.

Code samples

curl --request DELETE \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="DELETE")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123")

request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123/notes/abc123',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
204 No Contentdeleted
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan does not include CRM
403 Forbiddenthe key lacks the accounts_write scope
404 Not Foundno such note

List accounts

GET /c/api/v1/accounts

Returns a paginated, filterable, searchable page of the team's accounts. Requires the accounts_read scope and the CRM module.

Query parameters

FIELDTYPEDESCRIPTION
querystringFull-text search over name, industry, city, state, and country.
filter[industry]stringComma-separated industry values to filter by.
filter[owner_id]stringComma-separated owner (user) ids.
filter[city]stringComma-separated city names.
filter[state]stringComma-separated state values.
filter[country]stringComma-separated country values.
filter[account_status_id]stringComma-separated account-status ids.
filter[tags]stringComma-separated tag ids; returns accounts carrying any of them.
filter[search]stringAlias for query; full-text search via the internal index convention.
sortstringSort column, - prefix for descending. One of name, industry, city, state, country, created_at, updated_at. Default -updated_at.
pageinteger1-based page number.
per_pageintegerPage size (1–100, default 25).

Code samples

curl --request GET \
  --url 'https://api.cornerspot.net/c/api/v1/accounts' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="GET")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKa page of accounts
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan doesn't include the CRM module
403 Forbiddenthe key lacks the accounts_read scope

Create an account

POST /c/api/v1/accounts

Creates an account. name and owner_id are required. Requires accounts_write.

Request body

FIELDTYPEDESCRIPTION
accountobject
account.namestring · requiredRequired — the account name.
account.industrystring
account.websitestring
account.phonestring
account.address_line1string
account.address_line2string
account.citystring
account.statestring
account.postal_codestring
account.countrystring
account.billing_emailstring
account.default_payment_termsstring
one of due_on_receipt, net_15, net_30, net_45, net_60, net_90
Net payment terms for this account.
account.tax_idstring
account.owner_idstring · requiredRequired — the owning user.
account.account_status_idstring
account.custom_fieldsobject
account.tag_ids[]array of string

Code samples

curl --request POST \
  --url 'https://api.cornerspot.net/c/api/v1/accounts' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "account": {
    "name": "string",
    "industry": "string",
    "website": "string",
    "phone": "string",
    "address_line1": "string",
    "address_line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string",
    "billing_email": "user@example.com",
    "default_payment_terms": "due_on_receipt",
    "tax_id": "abc123",
    "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "custom_fields": {},
    "tag_ids": [
      "abc123"
    ]
  }
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "account": {
      "name": "string",
      "industry": "string",
      "website": "string",
      "phone": "string",
      "address_line1": "string",
      "address_line2": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string",
      "country": "string",
      "billing_email": "user@example.com",
      "default_payment_terms": "due_on_receipt",
      "tax_id": "abc123",
      "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "custom_fields": {},
      "tag_ids": [
        "abc123"
      ]
    }
  })
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "account": {
      "name": "string",
      "industry": "string",
      "website": "string",
      "phone": "string",
      "address_line1": "string",
      "address_line2": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string",
      "country": "string",
      "billing_email": "user@example.com",
      "default_payment_terms": "due_on_receipt",
      "tax_id": "abc123",
      "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "custom_fields": {},
      "tag_ids": [
        "abc123"
      ]
    }
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts"
payload = json.dumps({
  "account": {
    "name": "string",
    "industry": "string",
    "website": "string",
    "phone": "string",
    "address_line1": "string",
    "address_line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string",
    "billing_email": "user@example.com",
    "default_payment_terms": "due_on_receipt",
    "tax_id": "abc123",
    "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "custom_fields": {},
    "tag_ids": [
      "abc123"
    ]
  }
}).encode("utf-8")
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, data=payload, headers=headers, method="POST")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts")

request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
  "account": {
    "name": "string",
    "industry": "string",
    "website": "string",
    "phone": "string",
    "address_line1": "string",
    "address_line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string",
    "billing_email": "user@example.com",
    "default_payment_terms": "due_on_receipt",
    "tax_id": "abc123",
    "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "custom_fields": {},
    "tag_ids": [
      "abc123"
    ]
  }
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_POSTFIELDS => json_encode([
    'account' => [
        'name' => 'string',
        'industry' => 'string',
        'website' => 'string',
        'phone' => 'string',
        'address_line1' => 'string',
        'address_line2' => 'string',
        'city' => 'string',
        'state' => 'string',
        'postal_code' => 'string',
        'country' => 'string',
        'billing_email' => 'user@example.com',
        'default_payment_terms' => 'due_on_receipt',
        'tax_id' => 'abc123',
        'owner_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
        'account_status_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
        'custom_fields' => [],
        'tag_ids' => [
            'abc123',
        ],
    ],
]),
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
201 Createdcreated
422 Unprocessable Contentvalidation errors (e.g. missing required fields)

Get an account

GET /c/api/v1/accounts/{id}

Path parameters

FIELDTYPEDESCRIPTION
idstring · requiredAccount id.

Code samples

curl --request GET \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="GET")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKthe account
401 Unauthorizedmissing or invalid API key
404 Not Foundno such account in this team

Update an account

PATCH /c/api/v1/accounts/{id}

Updates any subset of the account's attributes. Requires accounts_write.

Path parameters

FIELDTYPEDESCRIPTION
idstring · requiredAccount id.

Request body

FIELDTYPEDESCRIPTION
accountobject
account.namestring
account.industrystring
account.websitestring
account.phonestring
account.address_line1string
account.address_line2string
account.citystring
account.statestring
account.postal_codestring
account.countrystring
account.billing_emailstring
account.default_payment_termsstring
one of due_on_receipt, net_15, net_30, net_45, net_60, net_90
account.tax_idstring
account.owner_idstring
account.account_status_idstring
account.custom_fieldsobject
account.tag_ids[]array of string

Code samples

curl --request PATCH \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "account": {
    "name": "string",
    "industry": "string",
    "website": "string",
    "phone": "string",
    "address_line1": "string",
    "address_line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string",
    "billing_email": "user@example.com",
    "default_payment_terms": "due_on_receipt",
    "tax_id": "abc123",
    "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "custom_fields": {},
    "tag_ids": [
      "abc123"
    ]
  }
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "account": {
      "name": "string",
      "industry": "string",
      "website": "string",
      "phone": "string",
      "address_line1": "string",
      "address_line2": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string",
      "country": "string",
      "billing_email": "user@example.com",
      "default_payment_terms": "due_on_receipt",
      "tax_id": "abc123",
      "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "custom_fields": {},
      "tag_ids": [
        "abc123"
      ]
    }
  })
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "account": {
      "name": "string",
      "industry": "string",
      "website": "string",
      "phone": "string",
      "address_line1": "string",
      "address_line2": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string",
      "country": "string",
      "billing_email": "user@example.com",
      "default_payment_terms": "due_on_receipt",
      "tax_id": "abc123",
      "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
      "custom_fields": {},
      "tag_ids": [
        "abc123"
      ]
    }
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123"
payload = json.dumps({
  "account": {
    "name": "string",
    "industry": "string",
    "website": "string",
    "phone": "string",
    "address_line1": "string",
    "address_line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string",
    "billing_email": "user@example.com",
    "default_payment_terms": "due_on_receipt",
    "tax_id": "abc123",
    "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "custom_fields": {},
    "tag_ids": [
      "abc123"
    ]
  }
}).encode("utf-8")
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, data=payload, headers=headers, method="PATCH")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123")

request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
  "account": {
    "name": "string",
    "industry": "string",
    "website": "string",
    "phone": "string",
    "address_line1": "string",
    "address_line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country": "string",
    "billing_email": "user@example.com",
    "default_payment_terms": "due_on_receipt",
    "tax_id": "abc123",
    "owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "account_status_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
    "custom_fields": {},
    "tag_ids": [
      "abc123"
    ]
  }
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_POSTFIELDS => json_encode([
    'account' => [
        'name' => 'string',
        'industry' => 'string',
        'website' => 'string',
        'phone' => 'string',
        'address_line1' => 'string',
        'address_line2' => 'string',
        'city' => 'string',
        'state' => 'string',
        'postal_code' => 'string',
        'country' => 'string',
        'billing_email' => 'user@example.com',
        'default_payment_terms' => 'due_on_receipt',
        'tax_id' => 'abc123',
        'owner_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
        'account_status_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
        'custom_fields' => [],
        'tag_ids' => [
            'abc123',
        ],
    ],
]),
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
200 OKupdated
404 Not Foundno such account in this team

Delete (soft) an account

DELETE /c/api/v1/accounts/{id}

Soft-deletes the account and records a DeletionEvent so the account lands in Trash (restorable and purgeable). Accounts that have active subscriptions, invoices, or portal memberships cannot be deleted and return a 422.

Path parameters

FIELDTYPEDESCRIPTION
idstring · requiredAccount id.

Code samples

curl --request DELETE \
  --url 'https://api.cornerspot.net/c/api/v1/accounts/abc123' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/accounts/abc123', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/accounts/abc123"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, headers=headers, method="DELETE")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/accounts/abc123")

request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/accounts/abc123',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
204 No Contentdeleted
404 Not Foundno such account in this team

Was this article helpful?