Skip to main content
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": [
      "[email protected]"
    ],
    "job_title": "CTO",
    "phone_number": {
      "country_code": 1,
      "number": "5559876543"
    }
  }
}
'
{
  "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": [
      "[email protected]"
    ],
    "job_title": "CTO",
    "phone_number": {
      "country_code": 1,
      "number": "5559876543"
    },
    "location": {
      "city": "San Francisco",
      "region": "CA",
      "country": "US"
    }
  }
}

Authorizations

Authorization
string
header
required

API key for authentication (format: "Bearer YOUR_API_KEY")

Path Parameters

slug
string
required

Object slug (e.g., 'person', 'company')

Body

application/json

Upsert record request with matching attribute and data

attributes
object
required
matching_attribute
string
required

ID or slug of the attribute to match on

Response

Created or updated record with all attributes

attributes
object
created_at
string
id
string
object_id
string
type
string
updated_at
string
workspace_id
string