Create a new contact
POST
/v1/contactsAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredRequest body
requiredapplication/jsonacquisition_campaignstringAcquisition campaign
acquisition_mediumstringAcquisition medium
acquisition_sourcestringAcquisition source
custom_fieldsanyArbitrary custom fields
emailstringContact email
external_idstringExternal system ID
external_sourcestringExternal system source
first_namestringContact first name
last_namestringContact last name
namestringContact name
phone_numberstringrequiredPhone number
min length 1
profile_pic_urlstringProfile picture URL
Responses
201Created
acquisition_campaignstring | nullrequiredacquisition_mediumstring | nullrequiredacquisition_sourcestring | nullrequiredaverage_order_valuestring | nullrequiredcreated_atstringrequiredcustom_fieldsanyrequiredemailstring | nullrequiredengagement_scoreinteger<int32> | nullrequiredexternal_idstring | nullrequiredexternal_sourcestring | nullrequiredfirst_conversation_atstring | nullrequiredfirst_message_atstring | nullrequiredfirst_namestring | nullrequiredfirst_purchase_atstring | nullrequiredfirst_response_atstring | nullrequiredfirst_seen_atstring | nullrequiredidstringrequiredlast_activity_atstring | nullrequiredlast_inbound_message_atstring | nullrequiredlast_namestring | nullrequiredlast_outbound_message_atstring | nullrequiredlast_purchase_atstring | nullrequiredlifecycle_stage_changed_atstring | nullrequiredlifecycle_stage_idstring | nullrequiredlifetime_valuestring | nullrequiredmetadataanyrequirednamestring | nullrequiredorganization_idstringrequiredphone_numberstring | nullrequiredprofile_pic_urlstring | nullrequiredrfm_frequencyinteger<int32> | nullrequiredrfm_monetaryinteger<int32> | nullrequiredrfm_recencyinteger<int32> | nullrequiredrfm_scorestring | nullrequiredrfm_segmentstring | nullrequiredtotal_ordersinteger<int32> | nullrequiredupdated_atstringrequired400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/contacts" \
-H "Content-Type: application/json" \
-d '{
"acquisition_campaign": "string",
"acquisition_medium": "string",
"acquisition_source": "string",
"custom_fields": "string",
"email": "string",
"external_id": "string",
"external_source": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"phone_number": "string",
"profile_pic_url": "string"
}'const response = await fetch("/v1/contacts", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"acquisition_campaign": "string",
"acquisition_medium": "string",
"acquisition_source": "string",
"custom_fields": "string",
"email": "string",
"external_id": "string",
"external_source": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"phone_number": "string",
"profile_pic_url": "string"
})
});import requests
response = requests.post(
"/v1/contacts",
headers={
"Content-Type": "application/json"
},
json={
"acquisition_campaign": "string",
"acquisition_medium": "string",
"acquisition_source": "string",
"custom_fields": "string",
"email": "string",
"external_id": "string",
"external_source": "string",
"first_name": "string",
"last_name": "string",
"name": "string",
"phone_number": "string",
"profile_pic_url": "string"
},
)Response
{
"acquisition_campaign": "string",
"acquisition_medium": "string",
"acquisition_source": "string",
"average_order_value": "string",
"created_at": "string",
"custom_fields": "string",
"email": "string",
"engagement_score": 0,
"external_id": "string",
"external_source": "string",
"first_conversation_at": "string",
"first_message_at": "string",
"first_name": "string",
"first_purchase_at": "string",
"first_response_at": "string",
"first_seen_at": "string",
"id": "string",
"last_activity_at": "string",
"last_inbound_message_at": "string",
"last_name": "string",
"last_outbound_message_at": "string",
"last_purchase_at": "string",
"lifecycle_stage_changed_at": "string",
"lifecycle_stage_id": "string",
"lifetime_value": "string",
"metadata": "string",
"name": "string",
"organization_id": "string",
"phone_number": "string",
"profile_pic_url": "string",
"rfm_frequency": 0,
"rfm_monetary": 0,
"rfm_recency": 0,
"rfm_score": "string",
"rfm_segment": "string",
"total_orders": 0,
"updated_at": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}