Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nudj.cx/llms.txt

Use this file to discover all available pages before exploring further.

The Nudj Platform exposes three JSON-over-HTTPS APIs for building gamification experiences, managing communities, and analysing engagement data. Every endpoint lives under your organisation’s subdomain and accepts either Authorization: Bearer or x-api-token for authentication — see Authentication for the full matrix.

Available APIs

Integration API

User-scoped operations — challenges, rewards, achievements, and profile data for logged-in members

Admin API

Administrative operations for platform configuration, content management, and RBAC

Analytics API

Reporting endpoints for engagement metrics, leaderboards, and challenge performance

Base URL

Every request is scoped to your organisation’s subdomain:
https://{your-subdomain}.nudj.cx/api/v2/{api-type}/{endpoint}
  • {your-subdomain} is assigned when your organisation is provisioned (e.g. acme-corp). White-label custom domains are configurable via the Admin API’s /domains endpoints — see Custom Domains.
  • {api-type} is one of integration, admin, or analytics.
  • All requests must hit the subdomain that matches the token — cross-tenant token reuse is rejected at the auth middleware.

Making Your First Request

The example below uses Authorization: Bearer (recommended for new integrations). The legacy x-api-token header is also accepted everywhere — the runtime strips the Bearer prefix automatically if present.
// Replace '{subdomain}' with your organisation's subdomain
const response = await fetch('https://{subdomain}.nudj.cx/api/v2/integration/challenges', {
  headers: {
    'Authorization': `Bearer ${process.env.NUDJ_API_TOKEN}`,
    'Content-Type': 'application/json'
  }
});

const challenges = await response.json();
console.log(challenges);

Next Steps

Authentication

Bearer tokens, legacy x-api-token, per-API auth matrix, and best practices

Errors

The tRPC error envelope and common status codes

Pagination

The limit / skip contract and totalCount + edges response shape

Testing Guide

Using the interactive playground with your organisation’s domain

Webhooks

Outbound events, signing, retries, and idempotency

Internationalization

The x-language header and translated response bodies