cURL
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" } } }
Creates a new record or updates an existing one based on a matching attribute
API key for authentication (format: "Bearer YOUR_API_KEY")
Object slug (e.g., 'person', 'company')
Upsert record request with matching attribute and data
Show child attributes
Required when creating a new record, but optional when updating an existing record that already has a name. Can be a string (e.g., 'John Doe') or an object (e.g., {'first_name': 'John', 'last_name': 'Doe'} for Person objects).
ID or slug of the attribute to match on
Created or updated record with all attributes