Setup
To start using our Roblox backend services, simply include our module in your project. Follow the steps below to complete the integration in 5 minutes.
local DoganWorks = require(123456789) -- Module ID
local Backend = DoganWorks.init({
apiKey = "API_KEY_BURAYA",
gameId = game.PlaceId
})Do not use your API key in scripts outside of ServerScriptService. Exposing it on the client side creates a security risk.
Configuration
After initializing the module, you can use the following settings to customize it for your game.
| Setting | Type | Default | Description |
|---|---|---|---|
| antiExploit | boolean | true | Enables automatic cheat protection. |
| analytics | boolean | true | Collects player statistics. |
| secureTrading | boolean | false | Enables the secure trading API. |
Anti-Exploit
Our AI-powered protection system automatically blocks known exploit methods and removes the player from the server.
Speed Protection (Speed/Fly)
Detects characters exceeding normal walking speed and rewinds them (rubberbanding).
Noclip Protection
Prevents players from passing through walls.
Remote Spy Invisibility
Obfuscates sent events to make listening difficult.
Auto-Ban
Automatically bans players for repeated violations.
REST API Usage
You can access our backend services directly via HTTP requests without using the SDK. This allows you to develop Discord bots, web panels, or external applications.
Authentication
The x-api-key header is required for all API requests.
x-api-key: sk_live_123456789...
All API Endpoints
Analytics API
Track player behavior, spending, and retention rates. All events are automatically batched.
/api/v1/analytics/eventSends a single analytics event. Track events like session, purchase, and level-up.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| userId | string | ✓ | Roblox User ID |
| eventName | string | ✓ | Event name (e.g. "purchase", "level_up") |
| properties | object | – | Additional data (key-value) |
| timestamp | number | – | Unix timestamp (ms), default: now |
Request
{
"userId": "123456789",
"eventName": "item_purchased",
"properties": {
"itemId": "sword_legendary",
"price": 500,
"currency": "robux"
}
}Response (200)
{
"success": true,
"eventId": "evt_abc123..."
}/api/v1/analytics/batchBatch event submission. Automatically used by the SDK for performance. Max 100 events/request.
Request
{
"events": [
{
"userId": "123",
"eventName": "session_start"
},
{
"userId": "123",
"eventName": "level_up",
"properties": { "level": 5 }
}
]
}Response (200)
{
"success": true,
"eventIds": [
"evt_abc123...",
"evt_def456..."
]
}Error Response (429 - Rate Limit)
{ "error": "DAU limit exceeded", "current": 10500, "limit": 10000 }/api/v1/analytics/dauReturns Daily Active User (DAU) data based on date range.
Query Parameters
| Parameter | Type | Example |
|---|---|---|
| startDate | YYYY-MM-DD | 2024-01-01 |
| endDate | YYYY-MM-DD | 2024-01-31 |
Response (200)
{
"data": [
{ "date": "2024-01-01", "users": 1523 },
{ "date": "2024-01-02", "users": 1847 },
{ "date": "2024-01-03", "users": 1692 }
]
}/api/v1/analytics/revenueReturns revenue data based on date range. Sums up price values from "item_purchased" events.
Query Parameters
| Parameter | Type | Example |
|---|---|---|
| startDate | YYYY-MM-DD | 2024-01-01 |
| endDate | YYYY-MM-DD | 2024-01-31 |
Response (200)
{
"data": [
{ "date": "2024-01-01", "revenue": 15230 },
{ "date": "2024-01-02", "revenue": 18470 }
],
"totalRevenue": 33700
}/api/v1/analytics/retentionCalculates user retention rates (Day 1, Day 7, Day 30).
Query Parameters
| Parameter | Type | Example |
|---|---|---|
| cohortDate | YYYY-MM-DD | 2024-01-01 |
Response (200)
{
"cohortSize": 1523,
"retention": {
"day1": 42.15,
"day7": 18.32,
"day30": 8.47
}
}/api/v1/analytics/funnelPerforms funnel analysis. Calculates conversion rates between steps.
Request
{
"steps": [
"tutorial_start",
"tutorial_complete",
"first_purchase"
],
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}Response (200)
{
"steps": [
{ "name": "tutorial_start", "users": 10000 },
{ "name": "tutorial_complete", "users": 7500 },
{ "name": "first_purchase", "users": 1500 }
],
"overallConversion": 15.0
}/api/v1/analytics/player/:userIdReturns all statistics for a specific player.
Response (200)
{
"userId": "123456789",
"firstSeen": "2024-01-01T10:30:00Z",
"lastSeen": "2024-01-15T18:45:00Z",
"totalSessions": 47,
"totalPlayTime": 12840,
"totalSpent": 2500,
"events": {
"level_up": 23,
"item_purchased": 15,
"achievement_unlocked": 8
}
}Anti-Exploit API
/api/v1/exploits/check-ban/:userIdQueries a user's ban status.
/api/v1/exploits/reportReports suspicious activity. Automatically calculates threat score.
{ "userId": "123", "type": "SPEED_HACK", "metadata": { "speed": 150 } }Types: SPEED_HACK, TELEPORT, ITEM_DUPE, FLYING, NOCLIP, STAT_ABUSE
/api/v1/exploits/banBans a user.
{ "userId": "123", "duration": 3600, "reason": "Hile", "type": "TEMPORARY" }Types: TEMPORARY, PERMANENT, IP, HWID, SHADOW. duration=null for permanent ban.
/api/v1/exploits/ban?userId=123Removes a ban (unban).
/api/v1/exploits/reports?page=1&limit=50Lists all exploit reports.
/api/v1/exploits/statsReturns exploit statistics (total reports, bans, threat distribution).
Trading API
/api/v1/trading/createStarts a new trade (5min timeout).
{ "player1Id": "123", "player2Id": "456" }/api/v1/trading/:tradeId/add-itemAdds an item to the trade.
{ "playerId": "123", "items": [{ "itemId": "sword", "quantity": 1 }] }/api/v1/trading/:tradeId/readyMarks the player as ready.
{ "playerId": "123", "ready": true }/api/v1/trading/:tradeId/completeCompletes the trade when both players are ready (atomic).
/api/v1/trading/:tradeId/cancelCancels the trade.
{ "playerId": "123" }/api/v1/trading/verify-ownershipVerifies item ownership.
{ "playerId": "123", "items": [{ "itemId": "sword", "quantity": 1 }] }/api/v1/trading/history/:playerId?page=1&limit=20Returns player's trade history.
/api/v1/trading/statsReturns trade statistics.