API Reference

API Documentation

Complete reference for the Api's Mazvall REST API. Base URL: https://api-mazval.zone.id

Quick Start

1. Register an account

curl -X POST https://api-mazval.zone.id/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"secret","name":"You"}'

2. Generate an API key

curl -X POST https://api-mazval.zone.id/api/keys \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"My App"}'

3. Validate your key

curl -X POST https://api-mazval.zone.id/api/validate \
  -H "Content-Type: application/json" \
  -d '{"apiKey":"MVAL-XXXXXXXXXXXX"}'

Authentication

All protected endpoints require a Bearer token in the Authorization header. Obtain a token via /api/auth/login or /api/auth/register.

curl https://api-mazval.zone.id/api/keys \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Rate Limits

TierRequests/MinuteRequests/HourRequests/Day
Free101001,000
Developer602,00020,000
Enterprise30010,000100,000

Endpoints

Create a new user account

Request Body
{ "email": "user@example.com", "password": "secret123", "name": "John" }
Response
{ "success": true, "data": { "user": { "id": "...", "email": "user@example.com", "name": "John", "role": "user", "tier": "free" }, "token": "eyJhbG..." } }

API Key Format

All API keys follow the format MVAL-XXXXXXXXXXXX where X is a 12-character alphanumeric string.

MVAL-A3B7K9M2X4P8