curl --request POST \
--url https://api.statisfy.com/v1/objects/account/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alias_domains": null,
"arr": null,
"crm_account_id": null,
"domain": null,
"fields": {},
"name": null,
"renewal_date": null,
"type": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/account/records"
payload = {
"alias_domains": None,
"arr": None,
"crm_account_id": None,
"domain": None,
"fields": {},
"name": None,
"renewal_date": None,
"type": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alias_domains: null,
arr: null,
crm_account_id: null,
domain: null,
fields: {},
name: null,
renewal_date: null,
type: null
})
};
fetch('https://api.statisfy.com/v1/objects/account/records', 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.statisfy.com/v1/objects/account/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alias_domains' => null,
'arr' => null,
'crm_account_id' => null,
'domain' => null,
'fields' => [
],
'name' => null,
'renewal_date' => null,
'type' => null
]),
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.statisfy.com/v1/objects/account/records"
payload := strings.NewReader("{\n \"alias_domains\": null,\n \"arr\": null,\n \"crm_account_id\": null,\n \"domain\": null,\n \"fields\": {},\n \"name\": null,\n \"renewal_date\": null,\n \"type\": null\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/objects/account/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alias_domains\": null,\n \"arr\": null,\n \"crm_account_id\": null,\n \"domain\": null,\n \"fields\": {},\n \"name\": null,\n \"renewal_date\": null,\n \"type\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/account/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias_domains\": null,\n \"arr\": null,\n \"crm_account_id\": null,\n \"domain\": null,\n \"fields\": {},\n \"name\": null,\n \"renewal_date\": null,\n \"type\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account_summary__s_": "<string>",
"arr": 123,
"crm_account_id": "<string>",
"currency": "<string>",
"domain": "<string>",
"experience_health": "<string>",
"feature_requests_health": "<string>",
"fields": {},
"health": "<string>",
"health_summary": "<string>",
"hierarchy": "<string>",
"last_activity_date": "<string>",
"name": "<string>",
"outcomes_health": "<string>",
"owner_names": [
"<string>"
],
"owners": [
{
"user_id": "<string>",
"field": "<string>",
"role": "<string>",
"source": "<string>"
}
],
"parent": "<string>",
"product_usage_health": "<string>",
"relationship_health": "<string>",
"renewal_date": "<string>",
"risks_health": "<string>",
"type": "<string>"
}Create an account
Creates an account and returns it with 201. name and domain are required. domain is lowercased, then normalised as the app does it (protocol, www. and path removed). domain, alias_domains and crm_account_id can be set only when an account is created. Every other key is an update key, checked the same way: where describe marks name read-only (the workspace has not turned on account creation, or a sync such as a CRM or warehouse owns account names), a create is a 422 whose details mark name as field_not_writable. type defaults to Customer. A domain another live account holds, as its domain or an alias, is a 409 naming that account in details[].account_ids; so is a CRM id any account holds, a deleted one included, since a deleted account keeps its CRM id. The domain check matches exactly, so an older account stored with a domain in another case does not count, and two creates of one domain at the same moment can both succeed: run them one at a time, or match on crm_account_id. Send an Idempotency-Key header to make a retry safe: the same key replays the first response.
curl --request POST \
--url https://api.statisfy.com/v1/objects/account/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alias_domains": null,
"arr": null,
"crm_account_id": null,
"domain": null,
"fields": {},
"name": null,
"renewal_date": null,
"type": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/account/records"
payload = {
"alias_domains": None,
"arr": None,
"crm_account_id": None,
"domain": None,
"fields": {},
"name": None,
"renewal_date": None,
"type": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alias_domains: null,
arr: null,
crm_account_id: null,
domain: null,
fields: {},
name: null,
renewal_date: null,
type: null
})
};
fetch('https://api.statisfy.com/v1/objects/account/records', 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.statisfy.com/v1/objects/account/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alias_domains' => null,
'arr' => null,
'crm_account_id' => null,
'domain' => null,
'fields' => [
],
'name' => null,
'renewal_date' => null,
'type' => null
]),
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.statisfy.com/v1/objects/account/records"
payload := strings.NewReader("{\n \"alias_domains\": null,\n \"arr\": null,\n \"crm_account_id\": null,\n \"domain\": null,\n \"fields\": {},\n \"name\": null,\n \"renewal_date\": null,\n \"type\": null\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/objects/account/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alias_domains\": null,\n \"arr\": null,\n \"crm_account_id\": null,\n \"domain\": null,\n \"fields\": {},\n \"name\": null,\n \"renewal_date\": null,\n \"type\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/account/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias_domains\": null,\n \"arr\": null,\n \"crm_account_id\": null,\n \"domain\": null,\n \"fields\": {},\n \"name\": null,\n \"renewal_date\": null,\n \"type\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account_summary__s_": "<string>",
"arr": 123,
"crm_account_id": "<string>",
"currency": "<string>",
"domain": "<string>",
"experience_health": "<string>",
"feature_requests_health": "<string>",
"fields": {},
"health": "<string>",
"health_summary": "<string>",
"hierarchy": "<string>",
"last_activity_date": "<string>",
"name": "<string>",
"outcomes_health": "<string>",
"owner_names": [
"<string>"
],
"owners": [
{
"user_id": "<string>",
"field": "<string>",
"role": "<string>",
"source": "<string>"
}
],
"parent": "<string>",
"product_usage_health": "<string>",
"relationship_health": "<string>",
"renewal_date": "<string>",
"risks_health": "<string>",
"type": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
An update body plus the keys only a create sets. name and domain are required.
Response
Successful Response
Was this page helpful?