Authenticate with your Sweez apiKey in the x-api-key header.
Create Room and Get Match Result each cost 1 credit when the call succeeds.
Insufficient balance returns HTTP 402.
https://your-domain.com
Use your deployed Sweez domain (this page fills it automatically).
POST /v2/room/create
Creates a playable room. Deducts 1 credit only on success.
Example success response:
{
"success": true,
"data": {
"roomCode": "ABC123"
}
}
Insufficient credits:
{
"success": false,
"error": "Insufficient credits"
}
GET /getGameHistory?roomCode=ROOM
Fetches match history for a room code. Deducts 1 credit only on success.
Replace ROOM with the room code returned from Create Room.