Create an Event

Create new event

post

Create a new event for a contact. To identify the contact, use either user_id, or email & firstname or phone & firstname

Header parameters
X-API-KEYstringRequired

Your API key

X-SECRET-KEYstringRequired

Your Secret key

Body
app_idstringRequired
_idstringOptional
user_idstringRequired
emailstringOptional
phonestringOptional
event_typestringRequired
event_namestringOptional
event_datestring · dateRequired

Date of the event in YYYY-MM-DD format

event_timestring · timeOptional

Time of the event in HH:MM AM/PM format

idstringRequired

Unique Event ID from your system

is_visitbooleanOptional
is_purchasebooleanOptional
event_dataobject[]Optional

Event data with custom fields such as status, staff etc.

Example: {"status":"completed","staff":"John Doe"}
Responses
200
Event created successfully
application/json
post
POST /v2/ExternalApi/newEvent HTTP/1.1
Host: api.gleantap.com
X-API-KEY: text
X-SECRET-KEY: text
Content-Type: application/json
Accept: */*
Content-Length: 269

{
  "app_id": "text",
  "_id": "text",
  "user_id": "text",
  "email": "text",
  "phone": "text",
  "event_type": "text",
  "event_name": "text",
  "event_date": "2025-06-27",
  "event_time": "04:31:54",
  "id": "text",
  "is_visit": true,
  "is_purchase": true,
  "event_data": {
    "status": "completed",
    "staff": "John Doe"
  }
}
{
  "result": "success"
}

Last updated