Session

Create a new session

Create a session (contact) in the project from the project header. When userId is supplied this is an upsert: an existing contact with that userId is updated and returned instead of a new one being created (one session per project + userId). Without userId the contact is an email contact: an email contact with the same email is updated and returned, so inbound email and later identifies find it and a repeated import creates no duplicates.

post/sessions

Request

  • Base URL
    https://api.gleap.io/v3
  • URL
    https://api.gleap.io/v3/sessions
  • Auth
    HTTP bearer

Headers

projectstring required

Request body

gleapIdstring

Read-only; generated by the server, ignored on create/update.

gleapHashstring

Read-only; generated by the server, ignored on create/update.

langstring

Contact language. Ignored by POST /sessions for new email/guest sessions (created with "en"); settable via the SDK identify call or session update.

firstActivityunknown
lastHeardFromunknown
lastActivityunknown
lastFeedbackReportunknown
projectstring
organisationstring
unsubscribedboolean
unsubscribedAtunknown
unsubscribeReasonstring
lastPageViewunknown
userIdstring
namestring
locationunknown
emailstring
avatarstring
companyIdstring
emailOnlyboolean
companyNamestring
deviceTypestring
platformstring
slanumber double
phonestring
blockedboolean
planstring
valuenumber double
sessionsnumber double

Read-only; server-maintained counter.

facebookIdstring
instagramIdstring
instagramUsernamestring
telegramChatIdstring
telegramUsernamestring
outboundHistoryunknown
countFeedbackReportsnumber double
countFeedbackCommentsnumber double
tagsstring[]
checklistTasksunknown
customDataunknown
eventDataunknown

Response

Ok

unknown required

Changes

No recorded changes to this operation across all 56 revisions of this API.