This project is paused

Build Your Empire

Command armies, construct mighty fortresses, and forge alliances in the ultimate medieval strategy experience

Master the Art of War

Every great empire starts with a single village. Build, expand, and conquer in this strategic multiplayer experience.

🏘️

Village Management

Build and upgrade your village buildings. Manage resources like wood, clay, and iron to fuel your expansion.

⚔️

Army Training

Train diverse military units from spearmen to heavy cavalry. Each unit has unique strengths and weaknesses.

🛡️

Strategic Combat

Plan attacks, coordinate defenses, and engage in tactical battles. Timing and strategy determine victory.

💰

Resource Management

Balance production and consumption. Trade with allies and raid enemies to fuel your growing empire.

🤝

Alliance System

Form powerful alliances with other players. Coordinate attacks and share resources for mutual prosperity.

⏰

Real-time Events

Experience dynamic gameplay with real-time troop movements, construction, and battles that unfold continuously.

🛡️ Developer API

Integrate with our powerful REST API to build custom tools, mobile apps, or third-party integrations for your empire.

📚 View Full API Documentation

🔐 Getting Started - Authentication Flow

1

Register Account

POST /api/register

Create your account with email and password

2

Login & Get Token

POST /api/login

Receive your Bearer token for API access

3

Make Requests

Include Authorization: Bearer {token}

in all authenticated requests

🔑 Authentication

POST /api/register Public

Create a new user account

POST /api/login Public

Authenticate and get access token

GET /api/user Auth

Get current user information

🏘️ Village Management

GET /api/villages Auth

List all your villages

GET /api/villages/{id} Auth

Get village details and buildings

POST /api/villages Auth

Create a new village

POST /api/villages/{id}/upgrade/{building} Auth

Upgrade a building

⚔️ Army & Training

POST /api/villages/{id}/queue-troops Auth

Queue troops for training

GET /api/villages/{id}/training-queues Auth

Get training progress

POST /api/villages/{id}/cancel-training Auth

Cancel training queues

🛡️ Combat & Attacks

POST /api/villages/{id}/attack Auth

Launch an attack

GET /api/villages/{id}/attacks Auth

Get active attacks

GET /api/attacks/{id} Auth

Get attack details

DELETE /api/attacks/{id} Auth

Cancel an attack

🚀 Quick Start Example

# 1. Register a new account
curl -X POST https://tribalwars.x4d.nl/api/register \
-H "Content-Type: application/json" \
-d '{"name": "Your Name", "email": "you@example.com", "password": "password"}'
# 2. Login and get your token
curl -X POST https://tribalwars.x4d.nl/api/login \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "password"}'
# 3. Use your token to access protected endpoints
curl -X GET https://tribalwars.x4d.nl/api/villages \
-H "Authorization: Bearer YOUR_TOKEN_HERE"

Your Empire Awaits

Join thousands of players in epic battles for dominance. Will you become the ultimate tribal leader?