curl --request POST \
--url https://api.statisfy.com/v1/objects/contact/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": null,
"email": null,
"fields": {},
"first_name": null,
"last_name": null,
"name": null,
"role": null,
"title": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/contact/records"
payload = {
"accounts": None,
"email": None,
"fields": {},
"first_name": None,
"last_name": None,
"name": None,
"role": None,
"title": 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({
accounts: null,
email: null,
fields: {},
first_name: null,
last_name: null,
name: null,
role: null,
title: null
})
};
fetch('https://api.statisfy.com/v1/objects/contact/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/contact/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([
'accounts' => null,
'email' => null,
'fields' => [
],
'first_name' => null,
'last_name' => null,
'name' => null,
'role' => null,
'title' => 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/contact/records"
payload := strings.NewReader("{\n \"accounts\": null,\n \"email\": null,\n \"fields\": {},\n \"first_name\": null,\n \"last_name\": null,\n \"name\": null,\n \"role\": null,\n \"title\": 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/contact/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": null,\n \"email\": null,\n \"fields\": {},\n \"first_name\": null,\n \"last_name\": null,\n \"name\": null,\n \"role\": null,\n \"title\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/contact/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 \"accounts\": null,\n \"email\": null,\n \"fields\": {},\n \"first_name\": null,\n \"last_name\": null,\n \"name\": null,\n \"role\": null,\n \"title\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account": "<string>",
"accounts": [
"<string>"
],
"crm_contact_id": "<string>",
"department": "<string>",
"email": "<string>",
"engagements": 0,
"fields": {},
"first_name": "<string>",
"is_key_contact": false,
"last_engagement_date": "<string>",
"last_name": "<string>",
"name": "<string>",
"origin": "crm",
"role": "<string>",
"sentiment": "negative",
"title": "<string>"
}Create a contact
Creates a contact and returns it with 201: the app’s own save of a person. email (a bare address, stored lower-cased), a name and accounts are required. Send name, or first_name and/or last_name: when either part is sent, the name is built from the parts sent and replaces name (a blank part counts as not sent). accounts holds live account ids, the primary first; one listed twice counts once, and account is read-only, the first of them. title, role (the contact’s buying role, such as Economic Buyer, as your workspace’s People roles name it; free text) and custom fields under fields are optional. Text is trimmed and takes at most 1000 characters. Every key is checked before anything is written, and any problem refuses the whole request with a 422 listing each one in details; an address conflict (409) is checked once the body passes. The API writes contacts only: an address that matches one of your company’s domains (its primary or an alias) is a teammate’s, a 422. A domain matches by its first name, so on acme.com an acme.io address is refused and an eu.acme.com one is not. An address another person already has is a 409: if that person is a contact, details[0].contact_ids holds its id; if not (a vendor, a digital worker, a teammate off your domains), contact_ids is empty and no id is revealed. As in the app, the contact’s accounts count as set by hand: where an email, meeting or chat could belong to more than one account, they outrank a match by domain. Where your workspace pushes contacts to Salesforce, the next push creates a Salesforce Contact with the contact’s name, title and mapped custom fields; not its email or account. Describe’s writable lists what an update takes, not a create: email shows as not writable but a create requires it, and department shows as writable but a create refuses it (set it with an update). A 500 that says the contact was created names it in details (contact_ids): do not create it again. Send an Idempotency-Key header to make a retry safe: the same key replays the first answer, including such a 500.
curl --request POST \
--url https://api.statisfy.com/v1/objects/contact/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": null,
"email": null,
"fields": {},
"first_name": null,
"last_name": null,
"name": null,
"role": null,
"title": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/contact/records"
payload = {
"accounts": None,
"email": None,
"fields": {},
"first_name": None,
"last_name": None,
"name": None,
"role": None,
"title": 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({
accounts: null,
email: null,
fields: {},
first_name: null,
last_name: null,
name: null,
role: null,
title: null
})
};
fetch('https://api.statisfy.com/v1/objects/contact/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/contact/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([
'accounts' => null,
'email' => null,
'fields' => [
],
'first_name' => null,
'last_name' => null,
'name' => null,
'role' => null,
'title' => 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/contact/records"
payload := strings.NewReader("{\n \"accounts\": null,\n \"email\": null,\n \"fields\": {},\n \"first_name\": null,\n \"last_name\": null,\n \"name\": null,\n \"role\": null,\n \"title\": 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/contact/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": null,\n \"email\": null,\n \"fields\": {},\n \"first_name\": null,\n \"last_name\": null,\n \"name\": null,\n \"role\": null,\n \"title\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/contact/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 \"accounts\": null,\n \"email\": null,\n \"fields\": {},\n \"first_name\": null,\n \"last_name\": null,\n \"name\": null,\n \"role\": null,\n \"title\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account": "<string>",
"accounts": [
"<string>"
],
"crm_contact_id": "<string>",
"department": "<string>",
"email": "<string>",
"engagements": 0,
"fields": {},
"first_name": "<string>",
"is_key_contact": false,
"last_engagement_date": "<string>",
"last_name": "<string>",
"name": "<string>",
"origin": "crm",
"role": "<string>",
"sentiment": "negative",
"title": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
A create body in the contact's own shape: standard keys at the top level, custom
keys under fields. email, a name and accounts are required.
Response
Successful Response
Was this page helpful?