API Reference

Event API Reference

Track user registration events and get real-time fraud analysis.

Base URL

All API requests should be made to the following base URL.

https
https://api.trueguard.io/v2

Authentication

All API requests require authentication using your secret API key.

Security note

Never expose your secret API key in client-side code. Only use it in your backend services.

Required Header

header
x-api-key: YOUR_SECRET_API_KEY

Endpoints

Track user registration events and get real-time fraud analysis.

POST/event

Registration Attempt Event

Track registration attempts before they complete. This helps you spot suspicious activity early and prevent unwanted accounts from cluttering your database.

javascript
import axios from 'axios'; const response = await axios.post( "https://api.trueguard.io/v2/event", { action: "register", status: "attempt", verificationId: "550e8400-e29b-41d4-a716-446655440000", context: { ip: "192.168.1.1", email: "user@example.com", phone: "+1234567890", }, metadata: { source: "web", referrer: "https://example.com", }, }, { headers: { "x-api-key": "YOUR_SECRET_API_KEY", }, } );
POST/event

Registration Success Event

Track successful user registrations with complete user data. Returns risk scores and fraud signals for completed registrations.

javascript
import axios from 'axios'; const response = await axios.post( "https://api.trueguard.io/v2/event", { action: "register", status: "success", verificationId: "550e8400-e29b-41d4-a716-446655440000", context: { ip: "192.168.1.1", email: "user@example.com", phone: "+1234567890", }, user: { id: "user123", email: "user@example.com", metadata: { firstName: "John", lastName: "Doe", }, attachAttemptEvents: true, }, metadata: { source: "web", type: "password", }, }, { headers: { "x-api-key": "YOUR_SECRET_API_KEY", }, } );

Error handling

Understanding and handling API error responses.

HTTP Status Codes

400Bad Request - Invalid request format or missing required fields
401Unauthorized - Invalid or missing API key
429Too Many Requests - Rate limit or quota exceeded
500Internal Server Error - Something went wrong on our end

Support

Need help with integration?

Check out our quick start guide or reach out to our support team for assistance with implementing the Event API.

trueguard-logo© 2026 Trueguardinfo@trueguard.io