Skip to main content
POST
/
objects
/
{object_name}
/
records
cURL
curl --request POST \
  --url https://api.unifygtm.com/data/v1/objects/{object_name}/records \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "data": {}
}'
{
  "status": "success",
  "data": {
    "object": "<string>",
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "attributes": {}
  }
}

Overview

The create method creates a new record in the specified object. This method will fail if any record already exists with conflicting unique values, which may or may not be the desired behavior depending on your use case. If you are not sure whether a record already exists with the same unique values, consider using the upsert method instead.

Examples

This creates a new company record:
POST /objects/company/records

{
  "name": "Unify",
  "domain": "unifygtm.com",
  "description": "A nice company with a top-notch API.",
  "status": "Active"
}
This creates a new person record and links them to an existing company if it exists:
POST /objects/person/records

{
  "first_name": "Austin",
  "last_name": "Hughes",
  "email": "austinhughes@unifygtm.com",
  "title": "CEO",
  "company": {
    "match": {
      "domain": "unifygtm.com"
    }
  }
}
If a company with this domain does not exist, the company reference on this person will be null. If you want to create a company in that case instead, you can use a nested upsert:
POST /objects/person/records

{
  "first_name": "Austin",
  "last_name": "Hughes",
  "email": "austinhughes@unifygtm.com",
  "title": "CEO",
  "company": {
    "match": {
      "domain": "unifygtm.com"
    },
    "create": {
      "name": "Unify",
      "domain": "unifygtm.com",
      "linkedin_url": "https://www.linkedin.com/company/unifygtm"
    }
  }
}
This creates a new record in a custom object called product_user:
POST /objects/product_user/records

{
  "user_id": "6b2a2761-3cbe-481f-8a1e-b24859c674f8",
  "full_name": "Bob Smith",
  "email_address": "bob.smith@gmail.com",
  "plan": "free_tier"
}

Usage

Authorizations

x-api-key
string
header
required

Path Parameters

object_name
string
required

Body

application/json

Request body for creating a record.

data
object
required

The attribute values for the new record.

Response

Response for a successful create operation.

status
enum<string>
required
Available options:
success
data
object
required
I