curl --request PUT \
--url https://api.attio.com/v2/objects/people/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"values": {
"email_addresses": [
"john-smith@attio.com"
],
"name": [
{
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
],
"description": "Developer met at event",
"company": [
{
"target_object": "companies",
"target_record_id": "99a03ff3-0435-47da-95cc-76b2caeb4dab"
},
{
"target_object": "companies",
"domains": [
{
"domain": "attio.com"
}
]
}
],
"phone_numbers": [
{
"original_phone_number": "+15558675309",
"country_code": "US"
}
],
"primary_location": [
{
"line_1": "1 Infinite Loop",
"line_2": null,
"line_3": null,
"line_4": null,
"locality": "Cupertino",
"region": "CA",
"postcode": "95014",
"country_code": "US",
"latitude": "37.331741",
"longitude": "-122.030333"
}
],
"linkedin": "https://linkedin.com/in/johnsmith"
}
}
}
'import requests
url = "https://api.attio.com/v2/objects/people/records"
payload = { "data": { "values": {
"email_addresses": ["john-smith@attio.com"],
"name": [
{
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
],
"description": "Developer met at event",
"company": [
{
"target_object": "companies",
"target_record_id": "99a03ff3-0435-47da-95cc-76b2caeb4dab"
},
{
"target_object": "companies",
"domains": [{ "domain": "attio.com" }]
}
],
"phone_numbers": [
{
"original_phone_number": "+15558675309",
"country_code": "US"
}
],
"primary_location": [
{
"line_1": "1 Infinite Loop",
"line_2": None,
"line_3": None,
"line_4": None,
"locality": "Cupertino",
"region": "CA",
"postcode": "95014",
"country_code": "US",
"latitude": "37.331741",
"longitude": "-122.030333"
}
],
"linkedin": "https://linkedin.com/in/johnsmith"
} } }
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({
data: {
values: {
email_addresses: ['john-smith@attio.com'],
name: [{first_name: 'John', last_name: 'Smith', full_name: 'John Smith'}],
description: 'Developer met at event',
company: [
{
target_object: 'companies',
target_record_id: '99a03ff3-0435-47da-95cc-76b2caeb4dab'
},
{target_object: 'companies', domains: [{domain: 'attio.com'}]}
],
phone_numbers: [{original_phone_number: '+15558675309', country_code: 'US'}],
primary_location: [
{
line_1: '1 Infinite Loop',
line_2: null,
line_3: null,
line_4: null,
locality: 'Cupertino',
region: 'CA',
postcode: '95014',
country_code: 'US',
latitude: '37.331741',
longitude: '-122.030333'
}
],
linkedin: 'https://linkedin.com/in/johnsmith'
}
}
})
};
fetch('https://api.attio.com/v2/objects/people/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.attio.com/v2/objects/people/records",
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([
'data' => [
'values' => [
'email_addresses' => [
'john-smith@attio.com'
],
'name' => [
[
'first_name' => 'John',
'last_name' => 'Smith',
'full_name' => 'John Smith'
]
],
'description' => 'Developer met at event',
'company' => [
[
'target_object' => 'companies',
'target_record_id' => '99a03ff3-0435-47da-95cc-76b2caeb4dab'
],
[
'target_object' => 'companies',
'domains' => [
[
'domain' => 'attio.com'
]
]
]
],
'phone_numbers' => [
[
'original_phone_number' => '+15558675309',
'country_code' => 'US'
]
],
'primary_location' => [
[
'line_1' => '1 Infinite Loop',
'line_2' => null,
'line_3' => null,
'line_4' => null,
'locality' => 'Cupertino',
'region' => 'CA',
'postcode' => '95014',
'country_code' => 'US',
'latitude' => '37.331741',
'longitude' => '-122.030333'
]
],
'linkedin' => 'https://linkedin.com/in/johnsmith'
]
]
]),
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.attio.com/v2/objects/people/records"
payload := strings.NewReader("{\n \"data\": {\n \"values\": {\n \"email_addresses\": [\n \"john-smith@attio.com\"\n ],\n \"name\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n ],\n \"description\": \"Developer met at event\",\n \"company\": [\n {\n \"target_object\": \"companies\",\n \"target_record_id\": \"99a03ff3-0435-47da-95cc-76b2caeb4dab\"\n },\n {\n \"target_object\": \"companies\",\n \"domains\": [\n {\n \"domain\": \"attio.com\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n {\n \"original_phone_number\": \"+15558675309\",\n \"country_code\": \"US\"\n }\n ],\n \"primary_location\": [\n {\n \"line_1\": \"1 Infinite Loop\",\n \"line_2\": null,\n \"line_3\": null,\n \"line_4\": null,\n \"locality\": \"Cupertino\",\n \"region\": \"CA\",\n \"postcode\": \"95014\",\n \"country_code\": \"US\",\n \"latitude\": \"37.331741\",\n \"longitude\": \"-122.030333\"\n }\n ],\n \"linkedin\": \"https://linkedin.com/in/johnsmith\"\n }\n }\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.attio.com/v2/objects/people/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"values\": {\n \"email_addresses\": [\n \"john-smith@attio.com\"\n ],\n \"name\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n ],\n \"description\": \"Developer met at event\",\n \"company\": [\n {\n \"target_object\": \"companies\",\n \"target_record_id\": \"99a03ff3-0435-47da-95cc-76b2caeb4dab\"\n },\n {\n \"target_object\": \"companies\",\n \"domains\": [\n {\n \"domain\": \"attio.com\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n {\n \"original_phone_number\": \"+15558675309\",\n \"country_code\": \"US\"\n }\n ],\n \"primary_location\": [\n {\n \"line_1\": \"1 Infinite Loop\",\n \"line_2\": null,\n \"line_3\": null,\n \"line_4\": null,\n \"locality\": \"Cupertino\",\n \"region\": \"CA\",\n \"postcode\": \"95014\",\n \"country_code\": \"US\",\n \"latitude\": \"37.331741\",\n \"longitude\": \"-122.030333\"\n }\n ],\n \"linkedin\": \"https://linkedin.com/in/johnsmith\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/objects/people/records")
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 \"data\": {\n \"values\": {\n \"email_addresses\": [\n \"john-smith@attio.com\"\n ],\n \"name\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n ],\n \"description\": \"Developer met at event\",\n \"company\": [\n {\n \"target_object\": \"companies\",\n \"target_record_id\": \"99a03ff3-0435-47da-95cc-76b2caeb4dab\"\n },\n {\n \"target_object\": \"companies\",\n \"domains\": [\n {\n \"domain\": \"attio.com\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n {\n \"original_phone_number\": \"+15558675309\",\n \"country_code\": \"US\"\n }\n ],\n \"primary_location\": [\n {\n \"line_1\": \"1 Infinite Loop\",\n \"line_2\": null,\n \"line_3\": null,\n \"line_4\": null,\n \"locality\": \"Cupertino\",\n \"region\": \"CA\",\n \"postcode\": \"95014\",\n \"country_code\": \"US\",\n \"latitude\": \"37.331741\",\n \"longitude\": \"-122.030333\"\n }\n ],\n \"linkedin\": \"https://linkedin.com/in/johnsmith\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b"
},
"created_at": "2022-11-21T13:22:49.061281000Z",
"web_url": "https://app.attio.com/salarya/person/bf071e1f-6035-429d-b874-d83ea64ea13b",
"values": {
"strongest_connection_strength_legacy": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": 54.725113205693695,
"attribute_type": "number"
}
],
"last_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"twitter": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://x.com/johnsmith",
"attribute_type": "text"
}
],
"avatar_url": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/b792e7f9-003d-494f-a7b4-a53251c621e6",
"attribute_type": "text"
}
],
"job_title": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "Software Engineer",
"attribute_type": "text"
}
],
"next_calendar_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"company": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"target_object": "companies",
"target_record_id": "f528bd86-8142-4359-9a8c-b651d50a27b1",
"attribute_type": "record-reference"
}
],
"primary_location": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"line_1": "1 Infinite Loop",
"line_2": null,
"line_3": null,
"line_4": null,
"locality": "Cupertino",
"region": "CA",
"postcode": "95014",
"country_code": "US",
"latitude": "37.331741",
"longitude": "-122.030333",
"attribute_type": "location"
}
],
"angellist": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://angellist.com/johnsmith",
"attribute_type": "text"
}
],
"description": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"value": "Developer met at event",
"attribute_type": "text"
}
],
"strongest_connection_user": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"referenced_actor_type": "workspace-member",
"referenced_actor_id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64",
"attribute_type": "actor-reference"
}
],
"strongest_connection_strength": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"option": {
"id": {
"workspace_id": "ca10906c-6785-464e-bb6c-b003e63c6a18",
"object_id": "cf49cf53-dbb4-4d18-87fc-28aba21d7a49",
"attribute_id": "7914c8c4-34b1-42b6-9e4c-4db8baa58bfa",
"option_id": "e37175a9-94f3-410f-bb29-78287bc1c444"
},
"title": "Very strong",
"is_archived": false
},
"attribute_type": "select"
}
],
"last_email_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "system",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"email_addresses": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"original_email_address": "john-smith@attio.com",
"email_address": "john-smith@attio.com",
"email_domain": "attio.com",
"email_root_domain": "attio.com",
"email_local_specifier": "john-smith",
"attribute_type": "email-address"
}
],
"first_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "system",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"created_at": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "2023-01-01T15:00:00.000000000Z",
"attribute_type": "timestamp"
}
],
"created_by": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"referenced_actor_type": "workspace-member",
"referenced_actor_id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64",
"attribute_type": "actor-reference"
}
],
"last_calendar_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"linkedin": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://linkedin.com/in/johnsmith",
"attribute_type": "text"
}
],
"facebook": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://facebook.com/johnsmith",
"attribute_type": "text"
}
],
"name": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith",
"attribute_type": "personal-name"
}
],
"first_calendar_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"twitter_follower_count": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": 100,
"attribute_type": "number"
}
],
"instagram": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://instagram.com/johnsmith",
"attribute_type": "text"
}
],
"first_email_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"phone_numbers": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"country_code": "US",
"original_phone_number": "+15558675309",
"phone_number": "+15558675309",
"attribute_type": "phone-number"
}
]
}
}
}{
"status_code": 400,
"type": "invalid_request_error",
"code": "value_not_found",
"message": "No attribute was found for matching_attribute slug/ID \"my-attribute\"."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Object with slug/ID \"people\" not found."
}Upsert a person record
Use this endpoint to create or update person records, using a unique attribute to search for existing People (for example the email_addresses attribute). If a person is found with the same value for the matching attribute, that person will be updated. If no person with the same value for the matching attribute is found, a new person will be created instead. If you would like to avoid matching, please use the Create person endpoint.
If the matching attribute is a multiselect attribute, new values will be added and existing values will not be deleted. For any other multiselect attribute, all values will be either created or deleted as necessary to match the list of supplied values.
Required scopes: record_permission:read-write, object_configuration:read.
curl --request PUT \
--url https://api.attio.com/v2/objects/people/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"values": {
"email_addresses": [
"john-smith@attio.com"
],
"name": [
{
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
],
"description": "Developer met at event",
"company": [
{
"target_object": "companies",
"target_record_id": "99a03ff3-0435-47da-95cc-76b2caeb4dab"
},
{
"target_object": "companies",
"domains": [
{
"domain": "attio.com"
}
]
}
],
"phone_numbers": [
{
"original_phone_number": "+15558675309",
"country_code": "US"
}
],
"primary_location": [
{
"line_1": "1 Infinite Loop",
"line_2": null,
"line_3": null,
"line_4": null,
"locality": "Cupertino",
"region": "CA",
"postcode": "95014",
"country_code": "US",
"latitude": "37.331741",
"longitude": "-122.030333"
}
],
"linkedin": "https://linkedin.com/in/johnsmith"
}
}
}
'import requests
url = "https://api.attio.com/v2/objects/people/records"
payload = { "data": { "values": {
"email_addresses": ["john-smith@attio.com"],
"name": [
{
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith"
}
],
"description": "Developer met at event",
"company": [
{
"target_object": "companies",
"target_record_id": "99a03ff3-0435-47da-95cc-76b2caeb4dab"
},
{
"target_object": "companies",
"domains": [{ "domain": "attio.com" }]
}
],
"phone_numbers": [
{
"original_phone_number": "+15558675309",
"country_code": "US"
}
],
"primary_location": [
{
"line_1": "1 Infinite Loop",
"line_2": None,
"line_3": None,
"line_4": None,
"locality": "Cupertino",
"region": "CA",
"postcode": "95014",
"country_code": "US",
"latitude": "37.331741",
"longitude": "-122.030333"
}
],
"linkedin": "https://linkedin.com/in/johnsmith"
} } }
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({
data: {
values: {
email_addresses: ['john-smith@attio.com'],
name: [{first_name: 'John', last_name: 'Smith', full_name: 'John Smith'}],
description: 'Developer met at event',
company: [
{
target_object: 'companies',
target_record_id: '99a03ff3-0435-47da-95cc-76b2caeb4dab'
},
{target_object: 'companies', domains: [{domain: 'attio.com'}]}
],
phone_numbers: [{original_phone_number: '+15558675309', country_code: 'US'}],
primary_location: [
{
line_1: '1 Infinite Loop',
line_2: null,
line_3: null,
line_4: null,
locality: 'Cupertino',
region: 'CA',
postcode: '95014',
country_code: 'US',
latitude: '37.331741',
longitude: '-122.030333'
}
],
linkedin: 'https://linkedin.com/in/johnsmith'
}
}
})
};
fetch('https://api.attio.com/v2/objects/people/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.attio.com/v2/objects/people/records",
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([
'data' => [
'values' => [
'email_addresses' => [
'john-smith@attio.com'
],
'name' => [
[
'first_name' => 'John',
'last_name' => 'Smith',
'full_name' => 'John Smith'
]
],
'description' => 'Developer met at event',
'company' => [
[
'target_object' => 'companies',
'target_record_id' => '99a03ff3-0435-47da-95cc-76b2caeb4dab'
],
[
'target_object' => 'companies',
'domains' => [
[
'domain' => 'attio.com'
]
]
]
],
'phone_numbers' => [
[
'original_phone_number' => '+15558675309',
'country_code' => 'US'
]
],
'primary_location' => [
[
'line_1' => '1 Infinite Loop',
'line_2' => null,
'line_3' => null,
'line_4' => null,
'locality' => 'Cupertino',
'region' => 'CA',
'postcode' => '95014',
'country_code' => 'US',
'latitude' => '37.331741',
'longitude' => '-122.030333'
]
],
'linkedin' => 'https://linkedin.com/in/johnsmith'
]
]
]),
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.attio.com/v2/objects/people/records"
payload := strings.NewReader("{\n \"data\": {\n \"values\": {\n \"email_addresses\": [\n \"john-smith@attio.com\"\n ],\n \"name\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n ],\n \"description\": \"Developer met at event\",\n \"company\": [\n {\n \"target_object\": \"companies\",\n \"target_record_id\": \"99a03ff3-0435-47da-95cc-76b2caeb4dab\"\n },\n {\n \"target_object\": \"companies\",\n \"domains\": [\n {\n \"domain\": \"attio.com\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n {\n \"original_phone_number\": \"+15558675309\",\n \"country_code\": \"US\"\n }\n ],\n \"primary_location\": [\n {\n \"line_1\": \"1 Infinite Loop\",\n \"line_2\": null,\n \"line_3\": null,\n \"line_4\": null,\n \"locality\": \"Cupertino\",\n \"region\": \"CA\",\n \"postcode\": \"95014\",\n \"country_code\": \"US\",\n \"latitude\": \"37.331741\",\n \"longitude\": \"-122.030333\"\n }\n ],\n \"linkedin\": \"https://linkedin.com/in/johnsmith\"\n }\n }\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.attio.com/v2/objects/people/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"values\": {\n \"email_addresses\": [\n \"john-smith@attio.com\"\n ],\n \"name\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n ],\n \"description\": \"Developer met at event\",\n \"company\": [\n {\n \"target_object\": \"companies\",\n \"target_record_id\": \"99a03ff3-0435-47da-95cc-76b2caeb4dab\"\n },\n {\n \"target_object\": \"companies\",\n \"domains\": [\n {\n \"domain\": \"attio.com\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n {\n \"original_phone_number\": \"+15558675309\",\n \"country_code\": \"US\"\n }\n ],\n \"primary_location\": [\n {\n \"line_1\": \"1 Infinite Loop\",\n \"line_2\": null,\n \"line_3\": null,\n \"line_4\": null,\n \"locality\": \"Cupertino\",\n \"region\": \"CA\",\n \"postcode\": \"95014\",\n \"country_code\": \"US\",\n \"latitude\": \"37.331741\",\n \"longitude\": \"-122.030333\"\n }\n ],\n \"linkedin\": \"https://linkedin.com/in/johnsmith\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/objects/people/records")
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 \"data\": {\n \"values\": {\n \"email_addresses\": [\n \"john-smith@attio.com\"\n ],\n \"name\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"full_name\": \"John Smith\"\n }\n ],\n \"description\": \"Developer met at event\",\n \"company\": [\n {\n \"target_object\": \"companies\",\n \"target_record_id\": \"99a03ff3-0435-47da-95cc-76b2caeb4dab\"\n },\n {\n \"target_object\": \"companies\",\n \"domains\": [\n {\n \"domain\": \"attio.com\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n {\n \"original_phone_number\": \"+15558675309\",\n \"country_code\": \"US\"\n }\n ],\n \"primary_location\": [\n {\n \"line_1\": \"1 Infinite Loop\",\n \"line_2\": null,\n \"line_3\": null,\n \"line_4\": null,\n \"locality\": \"Cupertino\",\n \"region\": \"CA\",\n \"postcode\": \"95014\",\n \"country_code\": \"US\",\n \"latitude\": \"37.331741\",\n \"longitude\": \"-122.030333\"\n }\n ],\n \"linkedin\": \"https://linkedin.com/in/johnsmith\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b"
},
"created_at": "2022-11-21T13:22:49.061281000Z",
"web_url": "https://app.attio.com/salarya/person/bf071e1f-6035-429d-b874-d83ea64ea13b",
"values": {
"strongest_connection_strength_legacy": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": 54.725113205693695,
"attribute_type": "number"
}
],
"last_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"twitter": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://x.com/johnsmith",
"attribute_type": "text"
}
],
"avatar_url": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/b792e7f9-003d-494f-a7b4-a53251c621e6",
"attribute_type": "text"
}
],
"job_title": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "Software Engineer",
"attribute_type": "text"
}
],
"next_calendar_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"company": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"target_object": "companies",
"target_record_id": "f528bd86-8142-4359-9a8c-b651d50a27b1",
"attribute_type": "record-reference"
}
],
"primary_location": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"line_1": "1 Infinite Loop",
"line_2": null,
"line_3": null,
"line_4": null,
"locality": "Cupertino",
"region": "CA",
"postcode": "95014",
"country_code": "US",
"latitude": "37.331741",
"longitude": "-122.030333",
"attribute_type": "location"
}
],
"angellist": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://angellist.com/johnsmith",
"attribute_type": "text"
}
],
"description": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"value": "Developer met at event",
"attribute_type": "text"
}
],
"strongest_connection_user": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"referenced_actor_type": "workspace-member",
"referenced_actor_id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64",
"attribute_type": "actor-reference"
}
],
"strongest_connection_strength": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"option": {
"id": {
"workspace_id": "ca10906c-6785-464e-bb6c-b003e63c6a18",
"object_id": "cf49cf53-dbb4-4d18-87fc-28aba21d7a49",
"attribute_id": "7914c8c4-34b1-42b6-9e4c-4db8baa58bfa",
"option_id": "e37175a9-94f3-410f-bb29-78287bc1c444"
},
"title": "Very strong",
"is_archived": false
},
"attribute_type": "select"
}
],
"last_email_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "system",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"email_addresses": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"original_email_address": "john-smith@attio.com",
"email_address": "john-smith@attio.com",
"email_domain": "attio.com",
"email_root_domain": "attio.com",
"email_local_specifier": "john-smith",
"attribute_type": "email-address"
}
],
"first_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "system",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"created_at": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "2023-01-01T15:00:00.000000000Z",
"attribute_type": "timestamp"
}
],
"created_by": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"referenced_actor_type": "workspace-member",
"referenced_actor_id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64",
"attribute_type": "actor-reference"
}
],
"last_calendar_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"linkedin": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://linkedin.com/in/johnsmith",
"attribute_type": "text"
}
],
"facebook": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://facebook.com/johnsmith",
"attribute_type": "text"
}
],
"name": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith",
"attribute_type": "personal-name"
}
],
"first_calendar_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"twitter_follower_count": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": 100,
"attribute_type": "number"
}
],
"instagram": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"value": "https://instagram.com/johnsmith",
"attribute_type": "text"
}
],
"first_email_interaction": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "system",
"id": null
},
"interaction_type": "email",
"interacted_at": "2023-01-01T15:00:00.000000000Z",
"owner_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"attribute_type": "interaction"
}
],
"phone_numbers": [
{
"active_from": "2023-01-01T15:00:00.000000000Z",
"active_until": null,
"created_by_actor": {
"type": "workspace-member",
"id": "a976f6a9-fc2b-4acb-91e7-afb2d18b4e64"
},
"country_code": "US",
"original_phone_number": "+15558675309",
"phone_number": "+15558675309",
"attribute_type": "phone-number"
}
]
}
}
}{
"status_code": 400,
"type": "invalid_request_error",
"code": "value_not_found",
"message": "No attribute was found for matching_attribute slug/ID \"my-attribute\"."
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Object with slug/ID \"people\" not found."
}Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Query Parameters
The ID or slug of the attribute to use to check if a person already exists. The attribute must be unique. For person records email_addresses is the only unique attribute.
"email_addresses"
Body
Show child attributes
Show child attributes
Response
Success
Success
Show child attributes
Show child attributes
Was this page helpful?