API Documentation

Integrate Royal Icon Events into your applications.

REST API

Standard REST endpoints

JWT Auth

Secure token-based auth

Webhooks

Real-time event notifications

Base URL

https://royaliconevents.co.ke

Authentication

Include your JWT token in the Authorization header:

Authorization: Bearer <your-token>
GET/api/eventsList all published events
GET/api/events/[slug]Get event by slug
POST/api/events AuthCreate a new event
PUT/api/events/[id] AuthUpdate an event
DELETE/api/events/[id] AuthDelete an event
GET/api/competitionsList all active competitions
GET/api/competitions/[slug]Get competition by slug
POST/api/competitions AuthCreate a new competition
POST/api/votes AuthCast a vote
GET/api/leaderboard/[period]Get leaderboard by period
POST/api/payments/checkout AuthCreate payment session
POST/api/auth/loginLogin with email/password
POST/api/auth/registerRegister new account
GET/api/ogGenerate OG image (SVG)
POST/api/poster AuthGenerate event poster (SVG)

Example Request

# List events

curl -X GET https://royaliconevents.co.ke/api/events \

-H "Content-Type: application/json"


# Create payment session

curl -X POST https://royaliconevents.co.ke/api/payments/checkout \

-H "Authorization: Bearer YOUR_TOKEN" \

-H "Content-Type: application/json" \

-d {"amount": 2000, "currency": "KES", "method": "mpesa_stk"}