API Reference

REST API for WePredict. Base URL: https://wepredict.org/api

Overview

WePredict REST API reference for developers.

Base URL
https://wepredict.org/api
Authentication

Include a JWT bearer token on all authenticated requests. Tokens are obtained from/auth/login or/auth/register. Tokens expire after 7 days.

Authorization: Bearer <token>
Rate Limits
ScopeLimit
/auth/*20 requests / 15 minutes per IP
All other /api/* routes300 requests / 15 minutes per IP
Error Format

All errors return a JSON object with an error field.

{ "error": "description of the error" }
Status Codes
CodeMeaning
200 / 201Success
400Validation error or bad request
401Missing or invalid token
403Insufficient permissions
404Resource not found
429Rate limit exceeded
500Server error