ITFY E-Voting API

A secure, scalable RESTful API powering Ghana's premier electronic voting platform. Built for reliability, transparency, and real-time vote processing.

v1.1.0 • Production
API Operational
Database Connected
Cache Active

🚀 Quick Start

Get started with the ITFY E-Voting API in minutes. All endpoints require authentication unless specified otherwise.

# Base URL
GET https://api.itforyouthghana.org/api/v1

# Authentication
POST /api/v1/auth/login
# Include token in headers:
Authorization: Bearer <token>

📡 API Endpoints

Core endpoints for the e-voting platform:

  • POST /api/v1/auth/login
  • GET /api/v1/events
  • GET /api/v1/categories/:eventId
  • GET /api/v1/candidates/:categoryId
  • POST /api/v1/payments/initialize
  • POST /api/v1/votes/cast

✨ Platform Features

🔐

JWT Authentication

Secure token-based auth with refresh tokens

🎉

Event Management

Create and manage voting events

👤

Candidate System

Nominations and profiles

🗳️

Secure Voting

Real-time vote casting & tracking

💳

Paystack Payments

Integrated payment processing

📊

Live Analytics

Real-time voting statistics

🔔

Notifications

Email & push notifications

📈

Rate Limiting

Redis-backed request throttling

🔑 Authentication

The API uses JWT (JSON Web Tokens) for authentication. Obtain a token via login and include it in subsequent requests.

// Login Request
POST /api/v1/auth/login
{
  "email": "[email protected]",
  "password": "your-password"
}

// Response
{
  "token": "eyJhbGc...",
  "refreshToken": "eyJhbGc..."
}

💚 Health & Status

Monitor API health and system status:

  • GET /api/v1/health
  • GET /api/v1/health/detailed
  • GET /metrics