API Specifications Overview
TruePortAI exposes two families of REST APIs, all served behind AWS CloudFront at https://gateway.trueportai.com.
API Families
Authentication Summary
Platform API Authentication
Gateway API Authentication
Complete Endpoint Reference
Platform API — Global (Public / Global JWT)
Method |
Path |
Auth |
Description |
|---|---|---|---|
|
|
None |
Register new user |
|
|
None |
Login → global JWT |
|
|
None |
Request OTP code |
|
|
None |
Verify OTP → JWT |
|
|
None |
Send reset email |
|
|
Reset token |
Set new password |
|
|
Global JWT |
Change password |
|
|
Global JWT |
Get scoped JWT |
|
|
Global JWT |
Create organization |
|
|
Global JWT |
List my organizations |
|
|
None |
Check slug |
Platform API — Service (Scoped JWT required)
Method |
Path |
Min Role |
Description |
|---|---|---|---|
|
|
viewer |
Get tenant info |
|
|
viewer |
Switch env |
|
|
viewer |
List members |
|
|
admin |
Invite user |
|
|
admin |
Remove member |
|
|
viewer |
List plans |
|
|
admin |
Activate plan |
|
|
viewer |
Get configs |
|
|
admin |
Update config |
|
|
admin |
Get storage config |
|
|
admin |
Update storage config |
Platform API — Admin (Platform Admin only)
Method |
Path |
Description |
|---|---|---|
|
|
List all tenants |
|
|
Get tenant detail |
|
|
Suspend/activate |
|
|
List all users |
|
|
Platform statistics |
|
|
Global configs |
|
|
Update global config |
Gateway API — Proxy Routes (API Key: x-api-key: sk-...)
Method |
Path |
Description |
|---|---|---|
|
|
OpenAI proxy |
|
|
Anthropic proxy |
|
|
Google Gemini proxy |
|
|
Azure OpenAI proxy |
Gateway API — Management (Scoped JWT)
Method |
Path |
Min Role |
Description |
|---|---|---|---|
|
|
admin |
Create API key |
|
|
member |
List API keys |
|
|
admin |
Update key (enable/disable) |
|
|
admin |
Delete API key |
|
|
member |
Usage logs |
|
|
member |
Aggregated stats |
|
|
member |
Violations list |
|
|
member |
Violation detail |
|
|
member |
List policy rules |
|
|
admin |
Create policy rule |
|
|
admin |
Update policy rule |
|
|
admin |
Delete policy rule |
Health Endpoints (Public)
Method |
Path |
Description |
|---|---|---|
|
|
Platform backend health |
|
|
Gateway service health |
Common Headers
Header |
Required |
Description |
|---|---|---|
|
Yes (Platform API) |
JWT bearer token |
|
Yes (Gateway Proxy) |
TruePortAI API key |
|
Yes (POST/PUT) |
Request body format |
|
Dev only |
Override tenant (dev/localhost) |
Rate Limits
Endpoint Group |
Limit |
Window |
Response on Exceed |
|---|---|---|---|
Gateway Proxy |
Configurable per key (default: 60 RPM) |
1 minute |
|
Platform Auth |
10 attempts |
15 minutes |
|
Platform Management |
300 requests |
1 minute |
|
Analytics queries |
60 requests |
1 minute |
|
Pagination
All list endpoints use offset-based pagination:
# Request
GET /trueportai-services/api/v1/analytics/logs?limit=50&offset=100
# Response envelope
{
"items": [...],
"total": 5420,
"limit": 50,
"offset": 100
}
Versioning
The API follows URL-based versioning:
Current stable:
v1(/api/v1/)Breaking changes increment the version
Deprecated versions are supported for 6 months after new version release
Detailed API Documentation
For full request/response schemas and examples, see:
Gateway API Reference — Proxy routes, API key management, analytics, violations, policies
Platform API Reference — Auth, organizations, members, billing, configuration