Sending Events
Learn how to send events to your Eventicat aggregator using simple HTTP requests.
Event Basics
Every event sent to Eventicat requires two pieces of information:
- Aggregator ID (
_id) - Identifies which aggregator receives the event - Event Name (
name) - A string identifying the type of event
Events are sent to the /api/event endpoint using either GET or POST requests.
Endpoint
https://app.eventicat.com/api/event
Required Parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
_id | string | URL query | Your aggregator ID |
_apikey | string | URL query or Header | Your API key (see Authentication) |
name | string | URL query or Body | The event name |
Using GET Requests
GET requests are the simplest way to send events. All parameters are passed in the URL.
Basic Example
GET https://app.eventicat.com/api/event?_id=YOUR_AGGREGATOR_ID&_apikey=YOUR_API_KEY&name=user_signup
With cURL
curl "https://app.eventicat.com/api/event?_id=YOUR_AGGREGATOR_ID&_apikey=YOUR_API_KEY&name=user_signup"
For production applications, use environment variables to store credentials and prefer POST requests with Bearer token authentication. See Language Examples for ready-to-use helper functions.
Using POST Requests
POST requests are recommended for production use, especially when using Bearer token authentication or sending tags.
Basic Example
curl -X POST "https://app.eventicat.com/api/event?_id=YOUR_AGGREGATOR_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "user_signup"}'
Success Response
{
"status": "ok"
}
Check out Language Examples for production-ready helper functions in JavaScript, Python, PHP, Ruby, Go, and Rust.
Event Naming
Eventicat accepts any event name you send. There are no strict naming conventions—use whatever makes sense for your application.
Only Requirement
Event names must be URL-compatible (if using GET requests) and not cause HTTP 414 errors (URL too long).
Recommended Practices
While not enforced, these practices help keep your events organized:
- Be descriptive -
user_signupis clearer thanevent1 - Stay consistent - Use the same style across your application
- Keep it reasonable - Very long names may be hard to read in reports
Examples
All of these work fine:
// Lowercase with underscores
await sendEvent('user_signup');
// CamelCase
await sendEvent('UserSignup');
// Kebab-case
await sendEvent('user-signup');
// Spaces (encoded in URLs)
await sendEvent('user signup');
// Mixed
await sendEvent('User_Signup_Event');
Choose what works best for your team and stick with it.
Response Format
Success Response (201 Created)
{
"status": "ok"
}
Error Responses
400 Bad Request - Missing Parameters
{
"error": "Missing required parameters"
}
Cause: Missing _id, _apikey, or name parameter.
401 Unauthorized - Invalid API Key
{
"error": "Invalid API key"
}
Cause: The API key is incorrect or has been regenerated.
404 Not Found - Invalid Aggregator
{
"error": "Invalid aggregator"
}
Cause: The aggregator ID doesn't exist or doesn't belong to your account.
429 Too Many Requests - Rate Limit Exceeded
{
"error": "Rate limit exceeded",
"limit": 1000,
"remaining": 0,
"resetTime": 1640995200
}
Cause: You've exceeded your rate limit. Wait until the reset time.
500 Internal Server Error
{
"error": "Internal server error"
}
Cause: Something went wrong on our end. Try again or contact support.
Common Use Cases
User Authentication Events
Track user authentication flows:
user_signup- User creates an accountuser_login- User signs inuser_logout- User signs outpassword_reset- Password reset requested
E-commerce Events
Monitor your sales funnel:
cart_add_item- Item added to cartcheckout_started- User begins checkoutcheckout_completed- Purchase finalizedorder_shipped- Order dispatched
Application Monitoring
Track system health and operations:
api_error- API request failedjob_completed- Background task finishedbackup_created- Database backup completedhealth_check_passed- System health verified
Testing Events
You can test your event integration using cURL:
# Quick test with URL parameters
curl "https://app.eventicat.com/api/event?_id=YOUR_AGGREGATOR_ID&_apikey=YOUR_API_KEY&name=test_event"
# Test with Bearer token
curl -X POST "https://app.eventicat.com/api/event?_id=YOUR_AGGREGATOR_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "test_event"}'
Check your aggregator dashboard to verify the event was received.
Next Steps
- Language Examples - Production-ready helper functions for your language
- Event Tags - Learn how to add metadata to your events for better filtering and insights
- Authentication - Review authentication options in detail