Create or update a record
curl --request PUT \
--url https://app.nex.ai/api/developers/v1/objects/{slug} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"matching_attribute": "email_addresses",
"attributes": {
"name": {
"first_name": "Jane",
"last_name": "Smith"
},
"email_addresses": [
"jane@example.com"
],
"job_title": "CTO",
"phone_number": {
"country_code": 1,
"number": "5559876543"
}
}
}
'import requests
url = "https://app.nex.ai/api/developers/v1/objects/{slug}"
payload = {
"matching_attribute": "email_addresses",
"attributes": {
"name": {
"first_name": "Jane",
"last_name": "Smith"
},
"email_addresses": ["jane@example.com"],
"job_title": "CTO",
"phone_number": {
"country_code": 1,
"number": "5559876543"
}
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
matching_attribute: 'email_addresses',
attributes: {
name: {first_name: 'Jane', last_name: 'Smith'},
email_addresses: ['jane@example.com'],
job_title: 'CTO',
phone_number: {country_code: 1, number: '5559876543'}
}
})
};
fetch('https://app.nex.ai/api/developers/v1/objects/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.nex.ai/api/developers/v1/objects/{slug}"
payload := strings.NewReader("{\n \"matching_attribute\": \"email_addresses\",\n \"attributes\": {\n \"name\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\"\n },\n \"email_addresses\": [\n \"jane@example.com\"\n ],\n \"job_title\": \"CTO\",\n \"phone_number\": {\n \"country_code\": 1,\n \"number\": \"5559876543\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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))
}{
"id": "32414268188027657",
"object_id": "32414268188027650",
"type": "person",
"workspace_id": "32414268188027645",
"created_at": "2024-01-21T12:00:00Z",
"updated_at": "2024-01-21T12:00:00Z",
"attributes": {
"name": {
"first_name": "Jane",
"last_name": "Smith"
},
"email_addresses": [
"jane@example.com"
],
"job_title": "CTO",
"phone_number": {
"country_code": 1,
"number": "5559876543"
},
"location": {
"city": "San Francisco",
"region": "CA",
"country": "US"
}
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Records
Create or update a record
Creates a new record or updates an existing one based on a matching attribute
PUT
/
v1
/
objects
/
{slug}
Create or update a record
curl --request PUT \
--url https://app.nex.ai/api/developers/v1/objects/{slug} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"matching_attribute": "email_addresses",
"attributes": {
"name": {
"first_name": "Jane",
"last_name": "Smith"
},
"email_addresses": [
"jane@example.com"
],
"job_title": "CTO",
"phone_number": {
"country_code": 1,
"number": "5559876543"
}
}
}
'import requests
url = "https://app.nex.ai/api/developers/v1/objects/{slug}"
payload = {
"matching_attribute": "email_addresses",
"attributes": {
"name": {
"first_name": "Jane",
"last_name": "Smith"
},
"email_addresses": ["jane@example.com"],
"job_title": "CTO",
"phone_number": {
"country_code": 1,
"number": "5559876543"
}
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
matching_attribute: 'email_addresses',
attributes: {
name: {first_name: 'Jane', last_name: 'Smith'},
email_addresses: ['jane@example.com'],
job_title: 'CTO',
phone_number: {country_code: 1, number: '5559876543'}
}
})
};
fetch('https://app.nex.ai/api/developers/v1/objects/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.nex.ai/api/developers/v1/objects/{slug}"
payload := strings.NewReader("{\n \"matching_attribute\": \"email_addresses\",\n \"attributes\": {\n \"name\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\"\n },\n \"email_addresses\": [\n \"jane@example.com\"\n ],\n \"job_title\": \"CTO\",\n \"phone_number\": {\n \"country_code\": 1,\n \"number\": \"5559876543\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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))
}{
"id": "32414268188027657",
"object_id": "32414268188027650",
"type": "person",
"workspace_id": "32414268188027645",
"created_at": "2024-01-21T12:00:00Z",
"updated_at": "2024-01-21T12:00:00Z",
"attributes": {
"name": {
"first_name": "Jane",
"last_name": "Smith"
},
"email_addresses": [
"jane@example.com"
],
"job_title": "CTO",
"phone_number": {
"country_code": 1,
"number": "5559876543"
},
"location": {
"city": "San Francisco",
"region": "CA",
"country": "US"
}
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Authorizations
API key for authentication (format: "Bearer YOUR_API_KEY")
Path Parameters
Object slug (e.g., 'person', 'company')
Body
application/json
Upsert record request with matching attribute and data
Hide child attributes
Hide child attributes
ID or slug of the attribute to match on
Last modified on August 19, 2025
⌘I