GETTING STARTED

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.

MainModule.lua
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.

SettingTypeDefaultDescription
antiExploitbooleantrueEnables automatic cheat protection.
analyticsbooleantrueCollects player statistics.
secureTradingbooleanfalseEnables the secure trading API.
SECURITY

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 REFERENCE

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.

HEADER
x-api-key: sk_live_123456789...

All API Endpoints

Analytics API

Track player behavior, spending, and retention rates. All events are automatically batched.

POST/api/v1/analytics/event

Sends a single analytics event. Track events like session, purchase, and level-up.

Parameters
FieldTypeRequiredDescription
userIdstringRoblox User ID
eventNamestringEvent name (e.g. "purchase", "level_up")
propertiesobjectAdditional data (key-value)
timestampnumberUnix 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..."
}
POST/api/v1/analytics/batch

Batch 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 }
GET/api/v1/analytics/dau

Returns Daily Active User (DAU) data based on date range.

Query Parameters
ParameterTypeExample
startDateYYYY-MM-DD2024-01-01
endDateYYYY-MM-DD2024-01-31
Response (200)
{
  "data": [
    { "date": "2024-01-01", "users": 1523 },
    { "date": "2024-01-02", "users": 1847 },
    { "date": "2024-01-03", "users": 1692 }
  ]
}
GET/api/v1/analytics/revenue

Returns revenue data based on date range. Sums up price values from "item_purchased" events.

Query Parameters
ParameterTypeExample
startDateYYYY-MM-DD2024-01-01
endDateYYYY-MM-DD2024-01-31
Response (200)
{
  "data": [
    { "date": "2024-01-01", "revenue": 15230 },
    { "date": "2024-01-02", "revenue": 18470 }
  ],
  "totalRevenue": 33700
}
GET/api/v1/analytics/retention

Calculates user retention rates (Day 1, Day 7, Day 30).

Query Parameters
ParameterTypeExample
cohortDateYYYY-MM-DD2024-01-01
Response (200)
{
  "cohortSize": 1523,
  "retention": {
    "day1": 42.15,
    "day7": 18.32,
    "day30": 8.47
  }
}
POST/api/v1/analytics/funnel

Performs 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
}
GET/api/v1/analytics/player/:userId

Returns 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

GET/api/v1/exploits/check-ban/:userId

Queries a user's ban status.

POST/api/v1/exploits/report

Reports suspicious activity. Automatically calculates threat score.

{ "userId": "123", "type": "SPEED_HACK", "metadata": { "speed": 150 } }

Types: SPEED_HACK, TELEPORT, ITEM_DUPE, FLYING, NOCLIP, STAT_ABUSE

POST/api/v1/exploits/ban

Bans a user.

{ "userId": "123", "duration": 3600, "reason": "Hile", "type": "TEMPORARY" }

Types: TEMPORARY, PERMANENT, IP, HWID, SHADOW. duration=null for permanent ban.

DELETE/api/v1/exploits/ban?userId=123

Removes a ban (unban).

GET/api/v1/exploits/reports?page=1&limit=50

Lists all exploit reports.

GET/api/v1/exploits/stats

Returns exploit statistics (total reports, bans, threat distribution).

Trading API

POST/api/v1/trading/create

Starts a new trade (5min timeout).

{ "player1Id": "123", "player2Id": "456" }
POST/api/v1/trading/:tradeId/add-item

Adds an item to the trade.

{ "playerId": "123", "items": [{ "itemId": "sword", "quantity": 1 }] }
POST/api/v1/trading/:tradeId/ready

Marks the player as ready.

{ "playerId": "123", "ready": true }
POST/api/v1/trading/:tradeId/complete

Completes the trade when both players are ready (atomic).

POST/api/v1/trading/:tradeId/cancel

Cancels the trade.

{ "playerId": "123" }
POST/api/v1/trading/verify-ownership

Verifies item ownership.

{ "playerId": "123", "items": [{ "itemId": "sword", "quantity": 1 }] }
GET/api/v1/trading/history/:playerId?page=1&limit=20

Returns player's trade history.

GET/api/v1/trading/stats

Returns trade statistics.

Code Examples