Overview
Every endpoint authenticates with an API token and returns the same JSON envelope.
Authentication
Every request must carry an API token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENGenerate a token at Settings → API Tokens. The raw token is shown once at creation; save it somewhere safe.
Token scopes
Each token holds one or more scopes. A request is allowed if at least one scope covers the method and path.
| Scope | What it allows |
|---|---|
admin | Every method on every path. |
read_only | GET and HEAD only, on any path. |
delete | DELETE only, on any path. |
update_script | PUT and PATCH on /api/v3/projects/:project_uuid/scripts/... only. |
A token whose scopes don't cover the request returns 403 with code: "SCOPE_DENIED".
Pick the narrowest set that covers your use case.
Base URL
https://api.envyauth.my.idResponse envelope
On success:
{ "success": true, "data": { }, "requestid": "uuid"}On error:
{ "success": false, "error": "Human-readable message", "code": "ERROR_CODE", "requestid": "uuid"}Each endpoint page documents the shape of data on success. Common code values: VALIDATION, NOT_FOUND, RATE_LIMIT, UNAUTHORIZED, LOGIN_KEY_AS_BEARER, SCOPE_DENIED, ALREADY_HAS_KEY, EXPIRED, INTERNAL.
Endpoints without a token
Two families are public by design, because they're called by buyers and community members rather than by you:
- Store — storefront availability, promo-code checks, checkout, and key claim. The
account_uuidin the path and the claim token are the only credentials involved. - Invite Rewards — the endpoints behind the public
/invite/<slug>page. Visitors are identified by a Discord cookie, not a Bearer token. The one exception is join attribution, which does take an API token.
Their owner-side counterparts — /api/v3/store/manage/* and the invite config endpoints — stay behind the dashboard session cookie plus CSRF and are not reachable with an API token.
User identifiers
Endpoints under /projects/:project_uuid/users/:identifier accept any of three shapes:
| Kind | Format |
|---|---|
| Discord ID | 17–20 digit snowflake |
| Script key | 32 alphanumeric characters (the value stored as script_key / user_key) |
| User UUID | Standard 36-character UUID with dashes |
If no user matches, the response is 404 with code: "NOT_FOUND".
Rate limits
Default: 60 requests per minute per IP. Response headers report the state:
X-RateLimit-Limit: 60X-RateLimit-Remaining: 47X-RateLimit-Reset: 1748430000X-RateLimit-Reset is a Unix timestamp in seconds. When the bucket is empty, the response is 429 with code: "RATE_LIMIT". Retry after the reset time.
Token creation is rate-limited separately: at most 10 tokens per 15 minutes per account.
Example
Shut down every session for a user, with an in-game toast:
curl -X POST "https://api.envyauth.my.id/api/v3/projects/<project_uuid>/users/<discord_id>/shutdown?message=Maintenance%20in%202%20minutes" \ -H "Authorization: Bearer YOUR_API_TOKEN"The same call in TypeScript:
const res = await fetch( `https://api.envyauth.my.id/api/v3/projects/${project_uuid}/users/${discord_id}/shutdown?message=Maintenance in 2 minutes`, { method : "POST", headers: { Authorization: `Bearer ${process.env.LUAEGIS_API_TOKEN}` }, },)const json = await res.json()if (!json.success) throw new Error(json.error)console.log(json.data) // { terminated, pending, elapsed_time }