API Reference
Complete reference for all Stashly API endpoints, organized by service.
Services#
| Service | Base URL | Purpose |
|---|---|---|
| Auth | https://auth.stashly.io | Authentication, OTP, JWT, sessions |
| Storage | https://api.stashly.io | Files, buckets, upload sessions, API keys |
| Billing | https://billing.stashly.io | Plans, subscriptions, payments |
Authentication#
All API requests must include one of:
- —
Authorization: Bearer <jwt>— for user-initiated requests - —
X-API-Key: sk_live_...— for server-to-server requests
Standard Response Envelope#
Every response — success or error — follows this format:
{
"success": true | false,
"message": "optional message",
"data": {} | []
}
Error Handling#
HTTP errors include a message field explaining what went wrong:
{
"success": false,
"message": "Storage quota exceeded",
"data": []
}
See the Error Codes reference for the full list.