GoliathDevelopersGet an API key
Reference/Contactsgenerated from the gateway manifest

createContact

Create a contact.

POST/api/v1/callWRITEidempotent · 24 hruns as the key's owner
View as Markdown

Create a contact; needs sellerFirstName, sellerLastName, and type (LISTING | INVESTMENT | BUYER | UNDETERMINED); phones/emails optional. Search findContacts by the name and each phone/email first: a match is a same-person-or-new question for the user BEFORE creating.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "createContact",
    "variables": {
      "input": {
        "sellerFirstName": "<String>",
        "sellerLastName": "<String>"
      }
    }
  }'
import { GoliathClient } from '@goliath-data/sdk'

const goliath = new GoliathClient({
  apiKey: process.env.GOLIATH_API_KEY!,
  baseUrl: 'https://server.goliathdata.com',
})

const result = await goliath.contacts.createContact(
  {
    input: {
      sellerFirstName: '<String>',
      sellerLastName: '<String>'
    }
  },
  { idempotencyKey: crypto.randomUUID() },
)
const res = await fetch('https://server.goliathdata.com/api/v1/call', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    operationId: 'createContact',
    variables: {
      input: {
        sellerFirstName: '<String>',
        sellerLastName: '<String>'
      }
    }
  }),
})
const { data, errors } = await res.json()

Variables

The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.

inputCreateContactInput!required
addressAddressInput
addressStringString
typePipelineItemType
LISTINGINVESTMENTUNDETERMINEDBUYER
sellerFirstNameString!required
sellerLastNameString!required
addMailingAddresses[CreateContactMailingAddressInput!]
addPhoneNumbers[CreateContactPhoneNumberInput!]
addEmails[CreateContactEmailInput!]
addCustomFieldValues[CreateContactCustomFieldInput!]
subContacts[CreateSubContactInput!]
addUserGroupIds[ID!]
Every field, all the way down
variables
[
  {
    "name": "input",
    "type": "CreateContactInput!",
    "required": true,
    "description": null,
    "defaultValue": null,
    "fields": [
      {
        "name": "address",
        "type": "AddressInput",
        "required": false,
        "description": null,
        "defaultValue": null,
        "fields": [
          {
            "name": "id",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "line1",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "line2",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "city",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "state",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "zip",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          }
        ]
      },
      {
        "name": "addressString",
        "type": "String",
        "required": false,
        "description": null,
        "defaultValue": null
      },
      {
        "name": "type",
        "type": "PipelineItemType",
        "required": false,
        "description": null,
        "defaultValue": null,
        "enumValues": [
          "LISTING",
          "INVESTMENT",
          "UNDETERMINED",
          "BUYER"
        ]
      },
      {
        "name": "sellerFirstName",
        "type": "String!",
        "required": true,
        "description": null,
        "defaultValue": null
      },
      {
        "name": "sellerLastName",
        "type": "String!",
        "required": true,
        "description": null,
        "defaultValue": null
      },
      {
        "name": "addMailingAddresses",
        "type": "[CreateContactMailingAddressInput!]",
        "required": false,
        "description": null,
        "defaultValue": null,
        "fields": [
          {
            "name": "addressString",
            "type": "String!",
            "required": true,
            "description": "Raw single-line address; resolved via MailingAddressResolutionService (property → address → raw).",
            "defaultValue": null
          },
          {
            "name": "propertyElasticsearchId",
            "type": "ID",
            "required": false,
            "description": "Instant-duplicate case: the property (Property.id / esId) the user copied this mailing address from: e.g. \"use my subject property as the mailing address\". When set, the mailing row links straight to that property (no ES search).",
            "defaultValue": null
          },
          {
            "name": "verificationStatus",
            "type": "VerificationStatus",
            "required": false,
            "description": null,
            "defaultValue": null,
            "enumValues": [
              "VERIFIED",
              "UNVERIFIED",
              "WRONG"
            ]
          },
          {
            "name": "ranking",
            "type": "Int",
            "required": false,
            "description": "Display order; lower is higher (0 = primary).",
            "defaultValue": null
          }
        ]
      },
      {
        "name": "addPhoneNumbers",
        "type": "[CreateContactPhoneNumberInput!]",
        "required": false,
        "description": null,
        "defaultValue": null,
        "fields": [
          {
            "name": "phoneNumber",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "verificationStatus",
            "type": "VerificationStatus!",
            "required": true,
            "description": null,
            "defaultValue": null,
            "enumValues": [
              "VERIFIED",
              "UNVERIFIED",
              "WRONG"
            ]
          },
          {
            "name": "phoneType",
            "type": "PhoneType",
            "required": false,
            "description": null,
            "defaultValue": null,
            "enumValues": [
              "MOBILE",
              "RESIDENTIAL",
              "LANDLINE",
              "UNKNOWN"
            ]
          },
          {
            "name": "note",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "ranking",
            "type": "Int",
            "required": false,
            "description": null,
            "defaultValue": null
          }
        ]
      },
      {
        "name": "addEmails",
        "type": "[CreateContactEmailInput!]",
        "required": false,
        "description": null,
        "defaultValue": null,
        "fields": [
          {
            "name": "email",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "verificationStatus",
            "type": "VerificationStatus!",
            "required": true,
            "description": null,
            "defaultValue": null,
            "enumValues": [
              "VERIFIED",
              "UNVERIFIED",
              "WRONG"
            ]
          },
          {
            "name": "note",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "ranking",
            "type": "Int",
            "required": false,
            "description": null,
            "defaultValue": null
          }
        ]
      },
      {
        "name": "addCustomFieldValues",
        "type": "[CreateContactCustomFieldInput!]",
        "required": false,
        "description": null,
        "defaultValue": null,
        "fields": [
          {
            "name": "customFieldId",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "textValue",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "calendarDate",
            "type": "String",
            "required": false,
            "description": "Preferred DATE value as a strict calendar day (YYYY-MM-DD). Do not combine with dateValue.",
            "defaultValue": null
          },
          {
            "name": "dateValue",
            "type": "DateTime",
            "required": false,
            "description": "Legacy DATE compatibility input. Prefer calendarDate for new clients; do not combine both forms.",
            "defaultValue": null
          },
          {
            "name": "numberValue",
            "type": "Float",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "dropdownSelectedValues",
            "type": "[String!]",
            "required": false,
            "description": null,
            "defaultValue": null
          }
        ]
      },
      {
        "name": "subContacts",
        "type": "[CreateSubContactInput!]",
        "required": false,
        "description": null,
        "defaultValue": null,
        "fields": [
          {
            "name": "name",
            "type": "String!",
            "required": true,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "relation",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "note",
            "type": "String",
            "required": false,
            "description": null,
            "defaultValue": null
          },
          {
            "name": "phoneNumbers",
            "type": "[CreateContactPhoneNumberInput!]",
            "required": false,
            "description": null,
            "defaultValue": null,
            "fields": [
              {
                "name": "phoneNumber",
                "type": "String!",
                "required": true,
                "description": null,
                "defaultValue": null
              },
              {
                "name": "verificationStatus",
                "type": "VerificationStatus!",
                "required": true,
                "description": null,
                "defaultValue": null,
                "enumValues": [
                  "VERIFIED",
                  "UNVERIFIED",
                  "WRONG"
                ]
              },
              {
                "name": "phoneType",
                "type": "PhoneType",
                "required": false,
                "description": null,
                "defaultValue": null,
                "enumValues": [
                  "MOBILE",
                  "RESIDENTIAL",
                  "LANDLINE",
                  "UNKNOWN"
                ]
              },
              {
                "name": "note",
                "type": "String",
                "required": false,
                "description": null,
                "defaultValue": null
              },
              {
                "name": "ranking",
                "type": "Int",
                "required": false,
                "description": null,
                "defaultValue": null
              }
            ]
          },
          {
            "name": "emails",
            "type": "[CreateContactEmailInput!]",
            "required": false,
            "description": null,
            "defaultValue": null,
            "fields": [
              {
                "name": "email",
                "type": "String!",
                "required": true,
                "description": null,
                "defaultValue": null
              },
              {
                "name": "verificationStatus",
                "type": "VerificationStatus!",
                "required": true,
                "description": null,
                "defaultValue": null,
                "enumValues": [
                  "VERIFIED",
                  "UNVERIFIED",
                  "WRONG"
                ]
              },
              {
                "name": "note",
                "type": "String",
                "required": false,
                "description": null,
                "defaultValue": null
              },
              {
                "name": "ranking",
                "type": "Int",
                "required": false,
                "description": null,
                "defaultValue": null
              }
            ]
          }
        ]
      },
      {
        "name": "addUserGroupIds",
        "type": "[ID!]",
        "required": false,
        "description": null,
        "defaultValue": null
      }
    ]
  }
]

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "contactMutation": {
      "createContact": {
        "id": "<ID>",
        "name": "…",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "emails": [
          {
            "id": "<ID>",
            "email": "…",
            "verificationStatus": "VERIFIED"
          }
        ],
        "phoneNumbers": [
          {
            "id": "<ID>",
            "phoneNumber": "…",
            "phoneType": "MOBILE",
            "verificationStatus": "VERIFIED"
          }
        ]
      }
    }
  }
}

Errors

Idempotency

Send an Idempotency-Key of 1 to 255 characters. A finished request retried with the same key replays its stored response, marked Idempotency-Replayed: true; one still in flight returns 409 idempotency_conflict. Keys expire after 24 hours. Write without fear →