Templates
Saved presets for key generation.
Issue the same key batch again in one step, from the panel or the API.
Keep in mind
- Who can use it
access_typeisall,rolesorusers; the last two needallowed_rolesorallowed_users.- Batches
loopcountissues 1 to 10 keys each time the template is used.
List key templates
https://dev.mod.wtf/api/v2/action
methodget-key-templates
Your key generation templates.
Body
-
soft_idinteger optionalID of a software you own; your main software when omitted
-
limitinteger optionalNumber of records to return, 1..200, default 50
-
offsetinteger optionalNumber of records to skip for pagination
Errors it can return
POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json
{
"api_key": "YOUR_API_KEY",
"method": "get-key-templates"
}
curl -sS -X POST 'https://dev.mod.wtf/api/v2/action' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"method": "get-key-templates"
}'
const response = await fetch("https://dev.mod.wtf/api/v2/action", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"api_key": "YOUR_API_KEY",
"method": "get-key-templates"
}),
});
const result = await response.json();
$ch = curl_init('https://dev.mod.wtf/api/v2/action');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'api_key' => 'YOUR_API_KEY',
'method' => 'get-key-templates',
]),
]);
$result = json_decode(curl_exec($ch), true);
import requests
response = requests.post(
"https://dev.mod.wtf/api/v2/action",
json={
"api_key": "YOUR_API_KEY",
"method": "get-key-templates",
},
timeout=10,
)
result = response.json()
{
"ok": true,
"data": {
"total": 5,
"limit": 50,
"offset": 0,
"items": [
{
"id": 1,
"user_id": 1,
"soft_id": 123,
"name": "Weekly",
"game": "standoff2",
"duration": 7,
"key_type": "APK",
"max_devices": 1,
"loopcount": 10,
"use_count": 50,
"is_single": false,
"access_type": "all",
"allowed_roles": null,
"allowed_users": null,
"created_at": "2025-01-01 00:00:00"
}
]
}
}
{
"ok": false,
"error": "unauthorized",
"message": "Invalid or missing api_key"
}
Create key template
https://dev.mod.wtf/api/v2/action
methodcreate-key-template
Create a generation template.
Body
-
soft_idinteger requiredSoftware ID
-
namestring requiredTemplate name shown in the panel
-
gamestring requiredGame id
-
durationinteger | string requiredDays, a negative number for hours, or
lifetime -
key_typestring optionalAPK or INJECTOR
-
max_devicesinteger optionalDevice limit of each key, default 1
-
loopcountinteger optional1 to 10, default 1
-
is_singleboolean optionalTrue or false, single-use key
-
access_typestring optionalAll, roles or users
-
allowed_rolesarray optional1 to 5 role IDs (values 1..5), required when access_type=roles
-
allowed_usersarray optional1 to 100 user IDs from this software, required when access_type=users
Errors it can return
POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json
{
"api_key": "YOUR_API_KEY",
"method": "create-key-template",
"soft_id": 123,
"name": "Daily",
"game": "standoff2",
"duration": 1,
"max_devices": 1
}
curl -sS -X POST 'https://dev.mod.wtf/api/v2/action' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"method": "create-key-template",
"soft_id": 123,
"name": "Daily",
"game": "standoff2",
"duration": 1,
"max_devices": 1
}'
const response = await fetch("https://dev.mod.wtf/api/v2/action", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"api_key": "YOUR_API_KEY",
"method": "create-key-template",
"soft_id": 123,
"name": "Daily",
"game": "standoff2",
"duration": 1,
"max_devices": 1
}),
});
const result = await response.json();
$ch = curl_init('https://dev.mod.wtf/api/v2/action');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'api_key' => 'YOUR_API_KEY',
'method' => 'create-key-template',
'soft_id' => 123,
'name' => 'Daily',
'game' => 'standoff2',
'duration' => 1,
'max_devices' => 1,
]),
]);
$result = json_decode(curl_exec($ch), true);
import requests
response = requests.post(
"https://dev.mod.wtf/api/v2/action",
json={
"api_key": "YOUR_API_KEY",
"method": "create-key-template",
"soft_id": 123,
"name": "Daily",
"game": "standoff2",
"duration": 1,
"max_devices": 1,
},
timeout=10,
)
result = response.json()
{
"ok": true,
"data": {
"id": 1,
"user_id": 1,
"soft_id": 123,
"name": "Daily",
"game": "standoff2",
"duration": 1,
"key_type": "APK",
"max_devices": 1,
"loopcount": 1,
"use_count": 0,
"is_single": false,
"access_type": "all",
"allowed_roles": null,
"allowed_users": null,
"created_at": "2025-06-01 12:00:00"
}
}
{
"ok": false,
"error": "validation",
"message": "name, game, duration are required"
}
{
"ok": false,
"error": "unauthorized",
"message": "Invalid or missing api_key"
}
Delete key template
https://dev.mod.wtf/api/v2/action
methoddelete-key-template
Delete your template.
Body
-
template_idinteger requiredGeneration template ID
-
soft_idinteger optionalID of a software you own; your main software when omitted
Errors it can return
POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json
{
"api_key": "YOUR_API_KEY",
"method": "delete-key-template",
"template_id": 1
}
curl -sS -X POST 'https://dev.mod.wtf/api/v2/action' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"method": "delete-key-template",
"template_id": 1
}'
const response = await fetch("https://dev.mod.wtf/api/v2/action", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"api_key": "YOUR_API_KEY",
"method": "delete-key-template",
"template_id": 1
}),
});
const result = await response.json();
$ch = curl_init('https://dev.mod.wtf/api/v2/action');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'api_key' => 'YOUR_API_KEY',
'method' => 'delete-key-template',
'template_id' => 1,
]),
]);
$result = json_decode(curl_exec($ch), true);
import requests
response = requests.post(
"https://dev.mod.wtf/api/v2/action",
json={
"api_key": "YOUR_API_KEY",
"method": "delete-key-template",
"template_id": 1,
},
timeout=10,
)
result = response.json()
{
"ok": true,
"data": {
"deleted": true,
"id": 1
}
}
{
"ok": false,
"error": "not_found",
"message": "template not found"
}
{
"ok": false,
"error": "unauthorized",
"message": "Invalid or missing api_key"
}