devplatform API
A PHP/MySQL API gateway with developer accounts, API key management, rate limiting, and request logging. All endpoints return JSON.
https://plutusalerts.com/devplatform
Authentication
There are two separate credential types, don't mix them up:
Issued by /login.php. Used for account-level endpoints: managing API keys and viewing dashboard stats. Expires after 1 hour.
Authorization: Bearer <jwt>
Issued by /keys.php. Used only for actual API calls through the gateway. Doesn't expire, but can be revoked.
Authorization: Bearer ak_xxxxxxxx
Rate limits
Each API key has its own limit (default 60 requests/min, configurable per key). Limits are enforced on a fixed one-minute window. Every gateway response includes these headers:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 42
Exceeding the limit returns:
429 Too Many Requests
{ "error": "Rate limit exceeded, try again next minute" }
Errors
All errors return a JSON body with an error field and an appropriate status code:
| Status | Meaning |
|---|---|
| 401 | Missing, invalid, or expired token/key |
| 404 | Unknown endpoint path |
| 409 | Email already registered |
| 422 | Missing or invalid request fields |
| 429 | Rate limit exceeded |
/register.php
Create a developer account. No auth required.
{
"name": "Jay Williams",
"email": "you@example.com",
"password": "at least 8 characters"
}
curl -X POST https://plutusalerts.com/devplatform/register.php \
-H "Content-Type: application/json" \
-d '{"name":"Jay","email":"you@example.com","password":"secretpass"}'
{ "token": "eyJhbGciOi...", "developer_id": 2 }
/login.php
Exchange credentials for a developer session token.
{ "email": "you@example.com", "password": "secretpass" }
curl -X POST https://plutusalerts.com/devplatform/login.php \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"secretpass"}'
{ "token": "eyJhbGciOi..." }
/keys.php
List your API keys. Requires developer session token. Raw keys are never returned, only the prefix.
curl https://plutusalerts.com/devplatform/keys.php \ -H "Authorization: Bearer $TOKEN"
[
{
"id": 1,
"key_prefix": "ak_9f3b2c",
"name": "Production",
"status": "active",
"rate_limit_per_min": 120,
"created_at": "2026-08-14 10:02:00",
"revoked_at": null
}
]
/keys.php
Create a new API key. Requires developer session token. The raw key is only ever shown in this response, store it now.
{ "name": "Production", "rate_limit_per_min": 60 }
curl -X POST https://plutusalerts.com/devplatform/keys.php \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Production","rate_limit_per_min":60}'
{ "id": 3, "api_key": "ak_088851060870e245...", "name": "Production" }
/keys.php?id={id}
Revoke an API key. Requires developer session token. Revoked keys immediately stop working against the gateway.
curl -X DELETE "https://plutusalerts.com/devplatform/keys.php?id=3" \ -H "Authorization: Bearer $TOKEN"
{ "revoked": true }
/gateway.php?path={endpoint}
The actual API gateway. Requires an API key (not a developer token). Routes to one of the sample backend endpoints below.
| Path | Method | Description |
|---|---|---|
| /v1/weather | GET | Mock weather for a city (?city=) |
| /v1/quote | GET | Random inspirational quote |
| /v1/echo | POST | Echoes back the submitted JSON body |
curl "https://plutusalerts.com/devplatform/gateway.php?path=/v1/weather&city=Chesapeake" \ -H "Authorization: Bearer ak_xxxxxxxx"
{ "city": "Chesapeake", "temp_f": 72, "conditions": "Clear" }
/dashboard_stats.php?range={range}
Aggregated usage metrics across all of your API keys. Requires developer session token.
range is one of 24h, 7d, 30d (default 24h).
curl "https://plutusalerts.com/devplatform/dashboard_stats.php?range=24h" \ -H "Authorization: Bearer $TOKEN"
{
"requests_over_time": [{ "bucket": "2026-09-06 14:00:00", "count": 11 }],
"status_breakdown": [{ "bucket": "success", "count": 11 }],
"response_time_percentiles": { "p50": 3, "p95": 4, "p99": 4 },
"usage_by_endpoint": [
{ "path": "/v1/quote", "method": "GET", "count": 10 },
{ "path": "/v1/weather", "method": "GET", "count": 1 }
]
}