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.

1

Get your API Key

API keys are available in the Nonito dashboard.

2

Include the API Key header

Add the X-API-Key header to all your requests.

3

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.

POSThttps://api.nonito.xyz/event

Send 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.

HeaderValueRequired
X-API-KeyYour unique API keyRequired
Content-Typeapplication/jsonRequired

Request Body

Structure of the JSON payload for event tracking.

ParameterTypeDescription
event_nameRequiredstringThe name of the event (e.g., "button_click", "page_view", "purchase")
event_paramsOptionalobjectAdditional parameters/metadata for the event (any JSON object)

Code Examples

Example implementations in popular languages.

cURL

bash
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

javascript
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

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)

swift
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

json
{
  "status": "success",
  "data": [
    {
      "id": "uuid-here",
      "event_name": "button_click",
      "event_params": { ... },
      "created_at": "2026-01-10T12:00:00Z"
    }
  ]
}

Status Codes

200Event successfully recorded
400Bad Request — Missing event_name or invalid JSON
401Unauthorized — Missing or invalid X-API-Key header
500Server Error — Database or internal error

Common Event Examples

Suggested event names and parameters for common use cases.

Event NameSuggested ParamsUse Case
page_viewpage, referrer, user_idTrack page visits
button_clickbutton_id, page, user_idTrack UI interactions
user_signupuser_id, plan, sourceTrack new registrations
purchaseuser_id, amount, product_idTrack transactions
app_opendevice, version, user_idTrack app launches
errormessage, stack, user_idTrack errors