Event Tracking API

No SDK Required

One HTTP call does three things at once: records the behavior, registers the user, and updates their device token. Zero dependencies, any language, any platform.

Events are the foundation of SmartAppPush. Every event you send simultaneously records user behavior, creates or updates the user profile, and registers the device for push delivery. No separate registration calls needed.


Endpoint

endpoint
http
POST https://api.smartapppush.ai/events

Authentication: api_key in the request body (no Authorization header needed).

Request Example

request body
json
{
  "tenant_id": "your_tenant_id",
  "api_key": "your_app_api_key",
  "app_user_id": "user_123",
  "event_name": "purchase_completed",
  "event_time": "2026-03-29T14:30:00+03:00",
  "device_token": "fcm_or_onesignal_device_token",
  "platform": "android",
  "push_permission_granted": true,
  "timezone": "Europe/Istanbul",
  "language": "tr",
  "country": "TR",
  "session_id": "sess_abc123",
  "params": {
    "product_id": "SKU-9001",
    "amount": 49.99,
    "currency": "USD"
  }
}

Response

200 OK
json
{
  "fingerprint": "a1b2c3d4e5f6..."
}

Field Reference

FieldRequiredDescription
tenant_idYesYour account ID
api_keyYesYour app's API key
app_user_idNoYour internal user ID. If empty, an anonymous ID is auto-generated
event_nameYesEvent name (e.g., app_opened, purchase_completed)
event_timeYesRFC 3339 timestamp with timezone offset
device_tokenYesFCM registration token or OneSignal subscription ID. For FCM: token from onNewToken() (Android) or messaging:didReceiveRegistrationToken: (iOS) — can rotate. For OneSignal: stable subscription ID from the OneSignal SDK
platformYesOne of: android, ios, web
push_permission_grantedYesMust be true for the device to receive pushes
timezoneYesIANA timezone (e.g., Europe/Istanbul, America/New_York)
languageYesISO 639-1 language code (e.g., en, tr, de)
countryYesISO 3166-1 alpha-2 country code (e.g., US, TR, DE)
session_idYesSession identifier for grouping events within a single app session
paramsNoEvent-specific data for targeting and analytics
contextNoEnvironment metadata (app version, OS, screen)

params vs context

params — Event-specific data (product ID, amount, category). Used for campaign targeting and analytics. Put anything you want to filter by here.

context — Environment metadata (app version, OS, screen). Stored for reference but not used in targeting rules. Use for debugging and diagnostics only.

Why push_permission_granted Matters

Always send this field. Users can toggle notifications in device settings at any time. SmartAppPush only delivers to devices where push_permission_granted: true. If you omit this field, it defaults to false and the device will never receive pushes.

Deduplication

Every event gets a SHA-256 fingerprint. If you accidentally send the same event twice (network retry), the duplicate is silently ignored. The fingerprint is returned in the response for debugging.

Error Responses

StatusMeaning
400Validation error — missing fields, invalid format, unknown API key
503Server overloaded — retry after a short delay

System Event Reference

SmartAppPush ships with predefined system events. Use these as-is or send any custom event name — custom events are automatically discovered from your event stream.

Onboarding (4 events)+
Event NameDescriptionUseful Params
onboarding_displayedOnboarding screen shownscreen_index, variant
onboarding_step_completedUser completed a stepstep, step_name
onboarding_completedUser finished onboardingduration_seconds, steps_count
onboarding_skippedUser skipped onboardingskipped_at_step
App Lifecycle (2 events)+
Event NameDescriptionUseful Params
app_openedApp openedsource (notification, deeplink, organic)
screen_viewedUser viewed a screenscreen_name, previous_screen
Authentication (5 events)+
Event NameDescriptionUseful Params
login_page_displayedLogin screen shown
logged_inUser authenticatedmethod (email, google, apple)
sign_up_startedUser initiated registrationmethod
sign_up_completedUser finished registrationmethod
logged_outUser signed out
E-Commerce (15 events)+
Event NameDescriptionUseful Params
product_viewedViewed product detailproduct_id, category, price
product_list_viewedUser browsed a product listing/categorycategory, list_name, item_count
add_to_cartItem added to cartproduct_id, quantity, price, currency
remove_from_cartItem removed from cartproduct_id
cart_viewedUser opened cartitem_count, cart_total
begin_checkoutStarted checkoutcart_total, item_count, currency
checkout_abandonedLeft checkout incompletecart_total, step
payment_failedPayment unsuccessfulerror_code, payment_method
purchase_completedTransaction completedorder_id, amount, currency, item_count
coupon_appliedDiscount code appliedcoupon_code, discount_amount
coupon_failedCoupon code was invalid or expiredcoupon_code, reason
refund_requestedUser initiated refundorder_id, amount, reason
order_status_viewedUser checked order trackingorder_id, status
wishlist_addedItem saved to wishlistproduct_id, category
wishlist_removedItem removed from wishlistproduct_id
Search & Discovery (5 events)+
Event NameDescriptionUseful Params
search_performedUser searchedquery, results_count
search_result_clickedTapped a search resultquery, result_position, result_id
search_no_resultsEmpty search resultsquery
category_browsedBrowsed a categorycategory_name, item_count
filter_appliedApplied filtersfilter_type, filter_value
Subscription & Monetization (10 events)+
Event NameDescriptionUseful Params
paywall_displayedPaywall shownsource, variant
paywall_dismissedUser closed paywall without actionsource, time_spent_seconds
trial_startedFree trial beganplan, duration_days
trial_endedTrial expiredplan, converted
subscription_startedSubscription purchasedplan, price, currency, period
subscription_renewedSubscription renewedplan, price, period
subscription_cancelledSubscription cancelledplan, reason
subscription_expiredSubscription access endedplan
in_app_purchase_completedOne-time IAP completedproduct_id, amount, currency
billing_issue_detectedPayment method failedplan, error_code
Push Notifications (6 events)+
Event NameDescriptionUseful Params
push_permission_grantedUser allowed push
push_permission_deniedUser denied push
push_receivedPush delivered to devicecampaign_id, message_id
push_openedUser tapped pushcampaign_id, message_id
push_dismissedUser dismissed pushcampaign_id
notification_settings_changedUser modified notification preferenceschannel, enabled
Content & Engagement (7 events)+
Event NameDescriptionUseful Params
content_viewedUser consumed contentcontent_id, content_type, duration_seconds
content_completedUser finished contentcontent_id, completion_percent
feature_usedEngaged with a featurefeature_name, screen_name
feature_discoveredFirst time using featurefeature_name
rating_submittedUser rated somethingtarget_id, target_type, rating
review_submittedUser wrote a reviewtarget_id, target_type, rating
feedback_submittedIn-app feedback sentfeedback_type, screen_name
User Profile & Preferences (4 events)+
Event NameDescriptionUseful Params
profile_completedUser filled all required profile fields
profile_updatedUser changed profile informationfields_updated
language_changedUser changed app languagefrom_language, to_language
preferences_updatedUser changed app preferencespreference_key, new_value
Social & Virality (3 events)+
Event NameDescriptionUseful Params
content_sharedShared content externallycontent_id, share_method
invite_sentInvited someone to appinvite_method
referral_completedInvited user signed upreferrer_user_id
Friction & Errors (4 events)+
Event NameDescriptionUseful Params
error_encounteredUser hit an errorerror_code, error_message, screen_name
form_abandonedLeft form incompleteform_name, abandoned_at_step
deep_link_failedDeep link faileddeep_link_url, error_reason
permission_deniedDenied system permissionpermission_type

Custom events welcome.Send any event name you want — SmartAppPush automatically discovers and registers it for your app. System events above are just a starting point.

We use cookies to understand how you use our site and improve your experience. No personal data is sold or shared.