๐Ÿ“˜
Gleantap API
  • Introduction
  • Fetch Data
    • Attribute List
    • Attribute Event List
    • Locations
    • Class Schedule
    • Customers
    • Events for a Customer
    • Opted In Customers
    • Campaigns
    • Opted Out Customers
    • Workrooms
    • Forms
    • Form Submissions
  • Update Data
    • Create or Update Location
    • Create a Class
    • Delete Class
    • Create or Update Contact
    • SMS Opt-in a Contact
    • Add Memberships for Contact
    • Create an Event
    • Delete Contact
    • Merge Contacts
    • Send SMS Notification
    • Send Email Notifications
Powered by GitBook
On this page
  1. Update Data

Create or Update Contact

PreviousDelete ClassNextSMS Opt-in a Contact

Last updated 2 months ago

Create new contact

post

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"
}