LuaWarden
REST API

API reference

Automate obfuscations, projects, hosted scripts and access keys from your own tools and CI.

Authentication

The REST API lives under https://luawarden.dev/api/v1. Requests and responses are JSON unless noted.

Send your API key as a bearer token on every request. Create and revoke keys under Profile & API in the dashboard. A key is shown in full once, when you create it.

Header
Authorization: Bearer YOUR_API_KEY

Who can use it

The API is included with Premium and above. Obfuscations started through the API count toward your monthly obfuscations, the same as runs from the dashboard.

Concurrent builds

PlanBuilds running at once
Premium1
Commercial2
Enterprise4

A build that would go over the limit is answered with 429. Wait for a running build to finish, then try again.

Account

GET/api/v1/me

Returns the account that owns the API key, its plan and the build allowance.

Request
curl https://luawarden.dev/api/v1/me \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "id": "usr_example123",
  "username": "my_account",
  "plan": "premium",
  "builds": { "used": 412, "limit": 1000 },
  "concurrency": 1
}

Builds

POST/api/v1/obfuscate

Obfuscates a script into a custom-VM standalone Luau build on the unified main engine channel (maximum protection). name is the file name, source is the Luau source, and preset defaults to main. With async set to true the call returns at once and you poll the build until it is finished.

Request
curl -X POST https://luawarden.dev/api/v1/obfuscate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "main.luau", "source": "print(\"hello\")", "preset": "main", "async": true}'
Response · 201
{
  "id": "bld_example123",
  "name": "main.luau",
  "preset": "main",
  "status": "queued",
  "createdAt": "2026-11-28T12:00:00Z"
}
GET/api/v1/builds

Lists your builds, newest first.

Request
curl https://luawarden.dev/api/v1/builds \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "builds": [
    { "id": "bld_example123", "name": "main.luau", "preset": "main", "status": "completed", "outputBytes": 48213, "createdAt": "2026-11-28T12:00:00Z" }
  ]
}
GET/api/v1/builds/:id

Returns one build. status is queued, running, completed or failed.

Request
curl https://luawarden.dev/api/v1/builds/bld_example123 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "id": "bld_example123",
  "name": "main.luau",
  "preset": "main",
  "status": "completed",
  "outputBytes": 48213,
  "compileMs": 4400,
  "createdAt": "2026-11-28T12:00:00Z"
}
GET/api/v1/builds/:id/download

Downloads the obfuscated build as a file. The response body is the Luau file, not JSON.

Request
curl https://luawarden.dev/api/v1/builds/bld_example123/download \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o main.standalone.luau

Projects

GET/api/v1/projects

Lists your projects.

Request
curl https://luawarden.dev/api/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "projects": [
    { "id": "prj_example123", "name": "my_project", "status": "active", "hwidLock": true, "hwidResetCooldownSec": 86400, "scriptCount": 2, "keyCount": 250 }
  ]
}
POST/api/v1/projects

Creates a project.

Request
curl -X POST https://luawarden.dev/api/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my_project", "hwidLock": true, "hwidResetCooldownSec": 86400}'
Response · 201
{
  "id": "prj_example123",
  "name": "my_project",
  "status": "active",
  "hwidLock": true,
  "hwidResetCooldownSec": 86400
}
PATCH/api/v1/projects/:id

Changes a project. Send only the fields you want to change. The reset cooldown is between 21600 and 172800 seconds (6 to 48 hours).

Request
curl -X PATCH https://luawarden.dev/api/v1/projects/prj_example123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "paused", "hwidResetCooldownSec": 43200}'
Response · 200
{
  "id": "prj_example123",
  "name": "my_project",
  "status": "paused",
  "hwidLock": true,
  "hwidResetCooldownSec": 43200
}
DELETE/api/v1/projects/:id

Deletes a project together with its scripts and keys. This cannot be undone.

Request
curl -X DELETE https://luawarden.dev/api/v1/projects/prj_example123 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{ "deleted": true }

Scripts

GET/api/v1/scripts?projectId=:id

Lists your hosted scripts. Pass ?projectId=prj_example123 to filter to one project.

Request
curl "https://luawarden.dev/api/v1/scripts?projectId=prj_example123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "scripts": [
    { "id": "scr_example123", "name": "main", "version": 3, "status": "active", "loaderUrl": "https://luawarden.dev/l/scr_example123" }
  ]
}
POST/api/v1/projects/:id/scripts

Uploads a new hosted script and returns its loader.

Request
curl -X POST https://luawarden.dev/api/v1/projects/prj_example123/scripts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "main", "source": "print(\"hello\")"}'
Response · 201
{
  "id": "scr_example123",
  "name": "main",
  "version": 1,
  "status": "active",
  "loaderUrl": "https://luawarden.dev/l/scr_example123",
  "loaderSnippet": "script_key = \"YOUR_KEY_HERE\"\nloadstring(game:HttpGet(\"https://luawarden.dev/l/scr_example123\"))()"
}
PUT/api/v1/scripts/:id

Pushes a new version of a hosted script. The loader URL stays the same, so buyers get the update on their next run.

Request
curl -X PUT https://luawarden.dev/api/v1/scripts/scr_example123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": "print(\"hello again\")"}'
Response · 200
{
  "id": "scr_example123",
  "version": 4,
  "loaderUrl": "https://luawarden.dev/l/scr_example123"
}
PATCH/api/v1/scripts/:id

Renames a script, or pauses and resumes it.

Request
curl -X PATCH https://luawarden.dev/api/v1/scripts/scr_example123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "paused"}'
Response · 200
{
  "id": "scr_example123",
  "name": "main",
  "status": "paused"
}

Keys

GET/api/v1/keys?projectId=:id

Lists the access keys in a project. Use ?status=active, paused or expired to filter.

Request
curl "https://luawarden.dev/api/v1/keys?projectId=prj_example123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "keys": [
    { "keyId": "key_example123", "keyPrefix": "LW-7F3A", "discordId": "123456789012345678", "status": "active", "expiresAt": "2027-01-31T00:00:00Z", "hwidBound": true, "totalExecutions": 128 }
  ]
}
POST/api/v1/projects/:id/keys

Generates keys. count is 1 to 300. Leave expiresInDays out for lifetime keys. The full keys are returned once, in this response.

Request
curl -X POST https://luawarden.dev/api/v1/projects/prj_example123/keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"count": 25, "expiresInDays": 30}'
Response · 201
{
  "created": 25,
  "keys": [ "YOUR_KEY_HERE" ]
}
POST/api/v1/projects/:id/keys/import

Imports up to 5,000 existing keys. Each entry needs key; discordId and expiresAt are optional and are kept. With skipExpired set to true, entries whose date has passed are left out.

Request
curl -X POST https://luawarden.dev/api/v1/projects/prj_example123/keys/import \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"skipExpired": true, "entries": [{"key": "YOUR_KEY_HERE", "discordId": "123456789012345678", "expiresAt": "2027-01-31"}]}'
Response · 200
{
  "imported": 1,
  "skipped": 0,
  "summary": { "lifetime": 0, "active": 1, "expired": 0 }
}
POST/api/v1/keys/:keyId/reset-hwid

Clears the device a key is locked to. The key locks again to the next device that runs the script. Other key actions follow the same shape: /pause, /unpause, /revoke, and /ban-hwid.

Request
curl -X POST https://luawarden.dev/api/v1/keys/key_example123/reset-hwid \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "keyId": "key_example123",
  "hwidBound": false
}

Live

GET/api/v1/live

Returns what Live View shows: active sessions, recent events and 30 days of executions. Add ?projectId=prj_example123 for one project. Needs a plan with Live View.

Request
curl https://luawarden.dev/api/v1/live?projectId=prj_example123 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response · 200
{
  "serverTime": "2026-11-28T12:00:00Z",
  "sessions": [
    { "sessionId": "ses_example123", "scriptId": "scr_example123", "keyPrefix": "LW-7F3A", "lastSeenAt": "2026-11-28T11:59:48Z" }
  ],
  "events": [
    { "eventType": "unlock", "outcome": "allow", "keyPrefix": "LW-7F3A", "createdAt": "2026-11-28T11:58:10Z" }
  ],
  "analytics": { "totalExecutions": 148920, "activeUsers": 422, "blockedAttempts": 38 }
}
GET/api/v1/blacklist

Lists blacklisted HWIDs across your projects (or filter with ?projectId=prj_example123). Remove an entry with DELETE /api/v1/blacklist/:id. Requires Premium or higher.

Request
curl "https://luawarden.dev/api/v1/blacklist?projectId=prj_example123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Status codes

Errors come back as JSON with an error message.

CodeMeaning
200OK. The request worked.
201Created. A build, project, script or key was created.
400Bad request. A field is missing or has the wrong type.
401Unauthorized. The API key is missing, wrong or revoked.
403Forbidden. Your plan does not include this feature, or the resource belongs to another account.
404Not found. No build, project, script or key has that ID.
413Payload too large. The source file or the import list is over the limit.
429Too many requests. You hit the rate limit or your concurrent-build limit.