Records

Create or update a record

Changed on

Creates a new record or updates an existing one based on a matching attribute

put/v1/objects/{slug}

Request

  • Base URL
    https://app.nex.ai/api/developers
  • Auth
    API key in header Authorization

Path parameters

slugstring required

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

Request body

matching_attributestring required

ID or slug of the attribute to match on

Example request

{
  "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"
    }
  }
}

Response

Created or updated record with all attributes

attributesobject
created_atstring
idstring
object_idstring
typestring
updated_atstring
workspace_idstring

Example response

{
  "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"
    }
  }
}

Changes

    • info

      api operation id upsertRecord was added

    • breaking

      added the new required request property /

    • breaking

      the request property became required

    • breaking

      the request property became required