Nonito Events API
A powerful, lightweight events api for customer engagement using the Nonito Platform. Send custom events with flexible parameters and gain insights into user behavior.
Fast & Lightweight
Minimal overhead with maximum performance for high-throughput event tracking.
Easy Integration
Simple REST API works with any language or framework. Get started in minutes.
Secure by Default
API key authentication ensures only authorized applications can send events.
Quick Start
Get up and running with Nonito events in three simple steps.
Get your API Key
API keys are available in the Nonito dashboard.
Include the API Key header
Add the X-API-Key header to all your requests.
Send your first event
Make a POST request to the /event endpoint with your analytics data.
Try it out
curl -X POST https://api.nonito.xyz/event \ -H "Content-Type: application/json" \ -H "X-API-Key: your-api-key" \ -d '{"event_name": "page_view", "event_params": {"page": "/home"}}'
Endpoint
The single endpoint for sending analytics events.
https://api.nonito.xyz/eventSend analytics events to be stored in the database. Each event requires an event name and can optionally include custom parameters for additional context.
Authentication
All requests must be authenticated using an API key.
All requests must include an X-API-Key header for authentication. Requests without this header will receive a 401 Unauthorized response.
| Header | Value | Required |
|---|---|---|
X-API-Key | Your unique API key | Required |
Content-Type | application/json | Required |
Request Body
Structure of the JSON payload for event tracking.
| Parameter | Type | Description |
|---|---|---|
event_nameRequired | string | The name of the event (e.g., "button_click", "page_view", "purchase") |
event_paramsOptional | object | Additional parameters/metadata for the event (any JSON object) |
Code Examples
Example implementations in popular languages.
cURL
curl -X POST https://api.nonito.xyz/event \ -H "Content-Type: application/json" \ -H "X-API-Key: your-api-key" \ -d '{ "event_name": "button_click", "event_params": { "user_id": "12345", "button_id": "signup_btn", "page": "/home" } }'
JavaScript / TypeScript
const sendEvent = async (eventName, eventParams) => { const response = await fetch('https://api.nonito.xyz/event', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'your-api-key', }, body: JSON.stringify({ event_name: eventName, event_params: eventParams, }), }); return response.json(); }; // Example usage sendEvent('page_view', { page: '/dashboard', user_id: 'u_123', session_id: 's_456', });
Python
import requests def send_event(event_name, event_params): url = "https://api.nonito.xyz/event" headers = { "Content-Type": "application/json", "X-API-Key": "your-api-key", } payload = { "event_name": event_name, "event_params": event_params, } response = requests.post(url, json=payload, headers=headers) return response.json() # Example usage send_event("user_signup", { "user_id": "12345", "plan": "premium", "source": "google_ads", })
Swift (iOS)
import Foundation func sendEvent(eventName: String, eventParams: [String: Any]) async throws { let url = URL(string: "https://api.nonito.xyz/event")! var request = URLRequest(url: url) request.httpMethod = "POST" request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("your-api-key", forHTTPHeaderField: "X-API-Key") let payload: [String: Any] = [ "event_name": eventName, "event_params": eventParams ] request.httpBody = try JSONSerialization.data(withJSONObject: payload) let (data, _) = try await URLSession.shared.data(for: request) print(String(data: data, encoding: .utf8) ?? "") } // Example usage Task { try await sendEvent( eventName: "app_open", eventParams: ["device": "iPhone", "version": "2.1.0"] ) }
Response
API response format and status codes.
Success Response
{
"status": "success",
"data": [
{
"id": "uuid-here",
"event_name": "button_click",
"event_params": { ... },
"created_at": "2026-01-10T12:00:00Z"
}
]
}Status Codes
Common Event Examples
Suggested event names and parameters for common use cases.
| Event Name | Suggested Params | Use Case |
|---|---|---|
page_view | page, referrer, user_id | Track page visits |
button_click | button_id, page, user_id | Track UI interactions |
user_signup | user_id, plan, source | Track new registrations |
purchase | user_id, amount, product_id | Track transactions |
app_open | device, version, user_id | Track app launches |
error | message, stack, user_id | Track errors |