DAPI

Dashboard & Developer API

Programmatic access to your NitsuBot server configuration, member data, and analytics. Build integrations, automate workflows, and extend your Discord server.

SCROLL

All DAPI requests require an API key passed as a Bearer token in the Authorization header. Keys have to be requested from the NitsuBot Dashboard under Studio → Request a Custom Module. Fill out the form saying you are requesting a DAPI key.

🔐 Read Keys

Can only access all GET endpoints. Useful for read-only integrations, dashboards, or monitoring tools.

✏️ Write Keys

Can get full access to all endpoints including POST mutations. Handle with care — store securely, never expose client-side.

⚠️
Keys will by default be scoped to a single Guild ID. If a scoped key attempts to access a different guild, the request is rejected with 403.
HTTP Request Example
GET https://bot.nitsu.xyz/dapi/guild/123456789/info
Authorization: Bearer nitsu_your_api_key_here
Content-Type: application/json
ℹ️
API Key authentication bypasses CSRF validation entirely. You don't need to fetch a CSRF token when using key-based auth — this header-only flow is safe for server-to-server calls.

Rate limits are enforced per IP address. Limits are returned as standard headers on every response.

Global Limit

Applies to all GET requests.

50
requests / minute

Write Limit

Applies to all POST requests.

15
requests / minute

Rate limit headers returned on every response:

Response Headers
RateLimit-Limit:        50
RateLimit-Remaining:    48
RateLimit-Reset:        40
🚫
Exceeding rate limits returns 429 Too Many Requests with body {"error":"Trop de requêtes. Merci de ralentir un peu."}

All errors return a consistent JSON envelope with an error string field.

Status Meaning When it occurs
400 Bad Request Missing or invalid field in the request body (payload schema violation)
401 Unauthorized No valid session and no valid API key
403 Forbidden Invalid key, inactive key, wrong guild scope, or insufficient permissions
404 Not Found Guild not found, member not found, or bot absent from the server
429 Rate Limited Too many requests in the current window
500 Server Error Internal database or Discord API error
Error Response Shape
{
    "error": "Human-readable error message"
}

ℹ️
All endpoints are prefixed with https://bot.nitsu.xyz. Guild-scoped endpoints require the bot to be present in the target server. Click any endpoint to expand its full specification.

User & Guilds

GET /dapi/guild/{guildId}/info Guild channels, roles & metadata

Returns the guild's channel tree, role list, member count, and whether the user has Administrator permission (this will always be false for API keys regardless of your roles).

200 Success Response
JSON
{
    "guilds": { "eco": [{ "id": "111", "name": "My Server", "icon": "hash" }] },
    "channels": {
        "textChannels":  [{ "id": "...", "name": "general", "parentID": "..." }],
        "voiceChannels": [{ "id": "...", "name": "Voice 1", "parentID": "..." }],
        "categories":    [{ "id": "...", "name": "TEXT CHANNELS" }]
    },
    "roles":       [{ "id": "...", "name": "Member", "color": "#8b5cf6" }],
    "memberCount": 1234,
    "isAdmin":     false
}
GET /dapi/guild/{guildId}/member/{query} Full member profile

Fetch complete cross-module data for a guild member. {query} accepts either a Discord User ID (17–20 digit snowflake) or a username string.

Path Parameters

ParameterTypeRequiredDescription
guildId string required Discord Guild snowflake ID
query string required Discord User ID (17–20 digits) or username string
200 Success Response
JSON
{
    "userId":    "123456789012345678",
    "userName":  "nitsu",
    "userAvatar": "https://cdn.discordapp.com/avatars/...",
    "eco": {                           // null if no economy data
        "cash": 5000, "bank": 20000, "empruntAmount": 0, ...
    },
    "ecoItems":            [],          // array of owned shop items
    "moderation": {                    // null if no moderation record
        "warnings": 2, "mutedUntil": null, ...
    },
    "level": {                         // null if levels disabled
        "level": 12, "points": 3400
    },
    "enterprises":         [],          // owned enterprise slots
    "enterpriseItems":     [],          // produced items
    "enterpriseMaterials": []           // held materials
}

Configuration

GET /dapi/guild/{guildId}/config Utility module config

Fetch configuration for utility features: temp channels, staff logs, and ticket system.

200 Success Response
JSON
{
    "tempChannelCategoryId": "...",   // category for temp voice channels
    "tempChannelRoleId":     "...",   // role that can create temp channels
    "tempChannelCreatedId":  "...",   // the "create" trigger voice channel
    "staffLogsChannelId":    "...",   // channel for staff action logs
    "ticketCategoryId":      "...",   // category for ticket channels
    "maxTickets":            5         // max open tickets per user (1-50)
}
POST /dapi/guild/{guildId}/config Update utility config

Partially update utility module settings. All fields are optional — only included fields are updated.

Request Body

FieldTypeRequiredConstraints
tempChannelCategoryIdstringoptionalDiscord channel snowflake
tempChannelRoleIdstringoptionalDiscord role snowflake
tempChannelCreatedIdstringoptionalDiscord channel snowflake
staffLogsChannelIdstringoptionalDiscord channel snowflake
ticketCategoryIdstringoptionalDiscord channel snowflake
maxTicketsnumberoptionalInteger, min: 1, max: 50
200 Success
JSON
{ "success": true }
GET /dapi/guild/{guildId}/moderation/config AutoMod & moderation settings

Returns consolidated Auto-Mod thresholds, toggles, and allowed ad channels.

200 Success Response
JSON
{
    "swearThreshold":     3,
    "adThreshold":        2,
    "superMuteAtWarns":   5,
    "kickAtWarns":        7,
    "banAtWarns":         10,
    "ultraSafe":          false,
    "automodAntiSpam":    true,
    "automodAntiMentions":true,
    "automodAntiJurons":  false,
    "automodAntiPubs":    true,
    "automodMuteDuration":10,          // minutes
    "allowedAdsChannels": [{ "channelId": "..." }]
}
POST /dapi/guild/{guildId}/moderation/config Update AutoMod settings

Update Auto-Mod configuration. Passing allowedAdsChannels fully replaces the list (up to 50 entries).

FieldTypeRequiredConstraints
swearThresholdnumberoptionalmin: 1
adThresholdnumberoptionalmin: 1
superMuteAtWarnsnumberoptionalmin: 1
kickAtWarnsnumberoptionalmin: 1
banAtWarnsnumberoptionalmin: 1
ultraSafebooleanoptional
automodAntiSpambooleanoptional
automodAntiMentionsbooleanoptional
automodAntiJuronsbooleanoptional
automodAntiPubsbooleanoptional
automodMuteDurationnumberoptionalmin: 0 (minutes)
allowedAdsChannelsarrayoptionalmax: 50 items, each with channelId
200 Success
JSON
{ "success": true }
GET /dapi/guild/{guildId}/welcome/config Welcome & anti-alt config

Returns welcome/goodbye messages, join role, and anti-double-account level.

200 Success Response
JSON
{
    "welcomeChannelId":   "...",
    "welcomeMessage":     "Welcome {membre}!",   // {membre} = @mention
    "goodbyeMessage":     "Goodbye {membre}.",
    "onJoinRoleId":       "...",                // role given on join
    "antiDoubleAccount":  1,                    // 0=off, 1=log, 2=kick same IP, 3=strict
    "verifLogsChannelId": "..."
}
POST /dapi/guild/{guildId}/welcome/config Update welcome settings
FieldTypeRequiredConstraints
welcomeChannelIdstringoptionalDiscord channel snowflake
welcomeMessagestringoptionalmax: 2000 chars. Use {membre} for mention
goodbyeMessagestringoptionalmax: 2000 chars
onJoinRoleIdstringoptionalDiscord role snowflake
antiDoubleAccountnumberoptional0 = disabled · 1 = log only · 2 = kick same IP · 3 = strict (kick proxy OR same IP)
verifLogsChannelIdstringoptionalDiscord channel snowflake
200 Success
JSON
{ "success": true }
GET /dapi/guild/{guildId}/level/config XP & levels config
200 Success Response
JSON
{
    "featureEnabled":   true,
    "levelUpChannelId": "...",
    "levelUpMessage":   "GG {membre}, level {level}!",
    "xpCooldownSeconds": 60,
    "requiredRoleId":   "...",       // role required to earn XP
    "roleRewards": [
        { "id": 1, "level": 10, "roleId": "..." }
    ],
    "ignoredChannels": [
        { "id": 1, "channelId": "..." }
    ]
}
POST /dapi/guild/{guildId}/level/config Update levels config

Passing roleRewards or ignoredChannels will fully replace those collections. Max 500 items per array.

FieldTypeRequiredConstraints
featureEnabledbooleanoptional
levelUpChannelIdstringoptionalDiscord channel snowflake
levelUpMessagestringoptionalmax: 2000 chars
xpCooldownSecondsnumberoptionalmin: 0
requiredRoleIdstringoptionalDiscord role snowflake
roleRewardsarrayoptionalmax: 500 — each: {level, roleId}
ignoredChannelsarrayoptionalmax: 500 — each: {channelId}
200 Success
JSON
{ "success": true }

Economy

GET /dapi/guild/{guildId}/eco/config Economy module config

Returns full economy configuration including feature flags, earning params, and all items/role salaries.

200 Success Response
JSON
{
    "featureEconomy":   true,
    "featureWork":      true,
    "featureCrime":     false,
    "featureRob":       false,
    "featureNitsuCrypt":true,
    "featureCoinFlip":  true,
    "featureBitcoin":   false,
    "workMinEarning":       50,
    "workMaxEarning":       200,
    "workCooldownHours":    4,
    "crimeMinEarning":      100,
    "crimeMaxEarning":      500,
    "crimeCooldownHours":   6,
    "robCooldownHours":     8,
    "chatMinEarning":       5,
    "chatMaxEarning":       15,
    "chatCooldownMinutes":  2,
    "cooldownCasinoMinutes":30,
    "casinoLimit":          1000,
    "startingMoney":        500,
    "maxBank":              100000,
    "maxEmpruntable":       5000,
    "roleSalaries": [
        { "id": 1, "roleId": "...", "amount": 100 }
    ],
    "items": [
        { "id": 1, "name": "Café", "price": 50, "description": "Un bon café" }
    ]
}
POST /dapi/guild/{guildId}/eco/config Update economy config

Partially update economy settings. roleSalaries and items support upsert/delete — include an id to update an existing record, omit it to create a new one. Records not present in the array are deleted.

ℹ️
All numeric fields default to minimum 0 unless otherwise specified. Cooldowns are in hours or minutes as indicated in the field name.
FieldTypeRequiredConstraints
featureEconomy … featureBitcoinbooleanoptional7 feature flag toggles
workMinEarning / workMaxEarningnumberoptional
workCooldownHoursnumberoptionalmin: 0
crimeMinEarning / crimeMaxEarningnumberoptional
crimeCooldownHoursnumberoptionalmin: 0
robCooldownHoursnumberoptionalmin: 0
chatMinEarning / chatMaxEarningnumberoptional
chatCooldownMinutesnumberoptionalmin: 0
cooldownCasinoMinutesnumberoptionalmin: 0
casinoLimitnumberoptionalmin: 0
startingMoneynumberoptionalmin: 0
maxBanknumberoptional
maxEmpruntablenumberoptionalmin: 0
roleSalariesarrayoptionalmax: 500 — each: {id?, roleId, amount}
itemsarrayoptionalmax: 500 — each: {id?, name, price, description}
200 Success
JSON
{ "success": true }
GET /dapi/guild/{guildId}/enterprise/config Enterprise system config

Returns enterprise module settings including types, material types, and item types (with their material requirements).

200 Success Response
JSON
{
    "featureEnabled": true,
    "maxEnterprises": 3,
    "enterpriseTypes": [
        { "id": 1, "name": "Bakery", "price": 5000 }
    ],
    "materialTypes": [
        { "id": 1, "name": "Flour", "price": 100 }
    ],
    "enterpriseItemTypes": [
        {
        "id": 1, "name": "Baguette", "sellPrice": 200,
        "materials": [{ "materialTypeId": 1, "quantity": 2 }]
        }
    ]
}
POST /dapi/guild/{guildId}/enterprise/config Update enterprise config

Update enterprise system settings. Array fields support upsert via id. Item types include a nested materials array that is fully replaced on each save.

FieldTypeRequiredConstraints
featureEnabledbooleanoptional
maxEnterprisesnumberoptionalmin: 1
enterpriseTypesarrayoptionalmax: 500 — each: {id?, name, price}
materialTypesarrayoptionalmax: 500 — each: {id?, name, price}
enterpriseItemTypesarrayoptionalmax: 500 — each: {id?, name, sellPrice, materials: [{materialTypeId, quantity}]}
200 Success
JSON
{ "success": true }

Analytics

GET /dapi/guild/{guildId}/insights Server-wide analytics

Aggregated analytics across all modules: economy leaderboard, enterprise averages, alliance count, and top XP rankings.

200 Success Response
JSON
{
    "membersTotal": 1234,
    "totalCash":    4500000,
    "totalBank":    12000000,
    "avgMoney":     8200,
    "activeLoans":  7,
    "top3Richest": [
        { "name": "nitsu", "avatar": "https://...", "total": 500000 }
    ],
    "mostOwnedItemName": "Café",
    "enterprise": {
        "averages": { "ents": "1.2", "mats": "5.4", "prods": "3.1" },
        "moEnt": "Bakery", "moMat": "Flour", "moProd": "Baguette"
    },
    "allianceCount": 3,
    "top10Levels": [
        { "name": "nitsu", "avatar": "https://...", "level": 42, "points": 18200 }
    ]
}
GET /dapi/guild/{guildId}/news Dashboard overview data

Returns the latest NitsuBot news posts (up to 10), active dashboard sponsors, current bot status from Instatus, and the 10 most recent guild audit log entries.

200 Success Response
JSON
{
    "newsList": [
        { "id": 1, "title": "v3.2.0 Released", "content": "...", "publishedAt": "2026-04-01T..." }
    ],
    "botStatus": "En ligne",    // "En ligne" | "Performance dégradée" | "Maintenance en cours"
    "sponsors": [
        { "id": 1, "name": "Sponsor" }
    ],
    "serverLogs": [
        {
        "id": "...",
        "actionType": 24,             // Discord AuditLogEvent integer
        "executor": { "id": "...", "username": "nitsu" },
        "target": { "id": "..." },
        "reason": "Spam",
        "createdAt": "2026-04-22T12:00:00.000Z"
        }
    ]
}

Get your first DAPI response in under a minute.

bash
# Get guild insights
curl -X GET \
    "https://bot.nitsu.xyz/dapi/guild/YOUR_GUILD_ID/insights" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json"
javascript
const BASE = 'https://bot.nitsu.xyz';
const KEY  = 'nitsu_your_api_key';
const GUILD = 'YOUR_GUILD_ID';

async function getInsights() {
    const res = await fetch(`${BASE}/dapi/guild/${GUILD}/insights`, {
        headers: { 'Authorization': `Bearer ${KEY}` }
    });
    if (!res.ok) throw new Error(await res.text());
    return res.json();
}

getInsights().then(data => console.log(data));
python
import requests

BASE  = "https://bot.nitsu.xyz"
KEY   = "nitsu_your_api_key"
GUILD = "YOUR_GUILD_ID"

headers = {"Authorization": f"Bearer {KEY}"}

r = requests.get(f"{BASE}/dapi/guild/{GUILD}/insights", headers=headers)
r.raise_for_status()
print(r.json())

🍪 Privacy Settings & Cookies

Nitsu uses cookies and similar technologies to ensure the security of your account, measure audience engagement, and continuously improve. Functional cookies are always enabled and necessary for the website to work properly. Analytical and marketing cookies are optional. By accepting, you help us improve your experience and maintain our services free. Otherwise, you can .

You can change your choice at any time via the Legal link at the bottom of the page.