Create or Update Contact
Create a new or update contact in the system. To update existing contact, provide the user_id or the same email & firstname, or phone & firstname. In addition to the attributes listed below, you can add any custom attributes to the contact.
Header parameters
X-API-KEYstringRequired
Your API key
X-SECRET-KEYstringRequired
Your Secret key
Body
app_idstringRequired
first_namestringRequired
last_namestringRequired
emailstring · emailOptional
phonestringOptional
addressstringOptional
citystringOptional
statestringOptional
zipstringOptional
sourcestringOptional
user_idstringOptional
dobdateOptional
YYYY-MM-DD
created_datedatetimeOptional
YYYY-MM-DD HH:MM:SS
genderstringOptional
typestringOptional
eg. member, past, prospect
statusstringOptional
eg. active, inactive, non-member etc
locationstringOptional
optin_smsbooleanOptional
optout_emailbooleanOptional
tagsstringOptional
comma separated tags
tag_actionstringOptional
add or remove
Responses
200
Contact created successfully
application/json
400
Invalid request
post
POST /v2/ExternalApi/newContact HTTP/1.1
Host: api.gleantap.com
X-API-KEY: text
X-SECRET-KEY: text
Content-Type: application/json
Accept: */*
Content-Length: 354
{
"app_id": "text",
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone": "text",
"address": "text",
"city": "text",
"state": "text",
"zip": "text",
"source": "text",
"user_id": "text",
"dob": null,
"created_date": null,
"gender": "text",
"type": "text",
"status": "text",
"location": "text",
"optin_sms": true,
"optout_email": true,
"tags": "text",
"tag_action": "text"
}
{
"status": "success",
"_id": "text"
}
Last updated