POST
/
unified
/
crm
/
contacts
curl --request POST \
  --url https://api.stackone.com/unified/crm/contacts \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'x-account-id: <x-account-id>' \
  --data '{
  "first_name": "Steve",
  "last_name": "Wozniak",
  "company_name": "Apple Inc.",
  "emails": [
    "steve@apple.com"
  ],
  "phone_numbers": [
    "123-456-7890"
  ],
  "deal_ids": [
    "deal-001",
    "deal-002"
  ],
  "account_ids": [
    "account-123",
    "account-456"
  ],
  "custom_fields": [
    {
      "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
      "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
      "name": "Training Completion Status",
      "value": "Completed",
      "value_id": "value_456",
      "remote_value_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48"
    }
  ],
  "passthrough": {
    "other_known_names": "John Doe"
  }
}'
{
  "data": {
    "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "unified_custom_fields": {
      "my_project_custom_field_1": "REF-1236",
      "my_project_custom_field_2": "some other value"
    },
    "first_name": "Steve",
    "last_name": "Wozniak",
    "company_name": "Apple Inc.",
    "emails": [
      "steve@apple.com"
    ],
    "phone_numbers": [
      "123-456-7890"
    ],
    "deal_ids": [
      "deal-001",
      "deal-002"
    ],
    "remote_deal_ids": [
      "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
      "e3cb75bf-aa84-466e-a6c1-b8322b257a49"
    ],
    "account_ids": [
      "account-123",
      "account-456"
    ],
    "remote_account_ids": [
      "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
      "e3cb75bf-aa84-466e-a6c1-b8322b257a49"
    ],
    "custom_fields": [
      {
        "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
        "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
        "name": "Training Completion Status",
        "value": "Completed",
        "value_id": "value_456",
        "remote_value_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48"
      }
    ],
    "created_at": "2021-01-01T01:01:01.000Z",
    "updated_at": "2021-01-01T01:01:01.000Z"
  },
  "raw": [
    {
      "method": "<string>",
      "url": "<string>",
      "body": "<string>",
      "response": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Body

application/json
first_name
string | null

The contact first name

Example:

"Steve"

last_name
string | null

The contact last name

Example:

"Wozniak"

company_name
string | null

The contact company name

Example:

"Apple Inc."

emails
string[] | null

List of contact email addresses

Example:
["steve@apple.com"]
phone_numbers
string[] | null

List of contact phone numbers

Example:
["123-456-7890"]
deal_ids
string[] | null

List of associated deal IDs

Example:
["deal-001", "deal-002"]
account_ids
string[] | null

List of associated account IDs

Example:
["account-123", "account-456"]
custom_fields
object[] | null

Contact custom fields

passthrough
object | null

Value to pass through to the provider

Example:
{ "other_known_names": "John Doe" }

Response

200
application/json
The contact was successfully created.
data
object
required
raw
object[] | null