Adonis API Documentation
Welcome to the Adonis developer platform. Use the REST API to build integrations, automate workflows, and extend your workspace programmatically.
https://yourdomain.com/api/v1/
Overview
All API responses are JSON. All requests must include an Accept: application/json header. The API supports two authentication methods: JWT tokens (for user sessions) and API keys (for programmatic access).
- All responses follow
{"success": true/false, "data": {…}}structure - Pagination uses
{"data": [], "meta": {"total": n, "page": n, "per_page": n}} - Timestamps are UTC ISO 8601:
2024-01-15T10:30:00Z - Monetary values are floating-point USD unless otherwise noted
Authentication
JWT Authentication (User Sessions)
Obtain a token via POST /v1/auth/login and include it in every request:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…
API Key Authentication
Generate API keys from your Developer Dashboard. Keys follow the format adw_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Authorization: Bearer adw_live_a1b2c3d4e5f6…
Example Request
curl -X GET https://yourdomain.com/api/v1/licenses \
-H "Authorization: Bearer adw_live_…" \
-H "Accept: application/json"
Rate Limiting
| Auth type | Limit | Window |
|---|---|---|
| API Key | 120 requests | 60 seconds per key |
| JWT | 300 requests | 60 seconds per user |
| Public (unauthenticated) | 30 requests | 60 seconds per IP |
When exceeded, the API returns 429 Too Many Requests with a Retry-After header.
Error Responses
{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "The name field is required."
}
}
| HTTP Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Request payload failed validation |
| 401 | UNAUTHORIZED | Missing or invalid authentication |
| 403 | FORBIDDEN | Authenticated but lacks permission |
| 404 | NOT_FOUND | Resource not found |
| 422 | VALIDATION_FAILED | Semantic validation error |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | INTERNAL_SERVER_ERROR | Server error |
API Key Scopes
When creating an API key, select only the scopes your integration needs. JWT tokens bypass scope checks.
API Key Endpoints
POST /v1/developer/keys
{
"name": "CI/CD Pipeline",
"scopes": ["read:licenses", "read:analytics"],
"expires_at": "2025-12-31" // optional
}
Licenses
Required scope: read:licenses / write:licenses
Subscriptions
Required scope: read:billing / write:billing
Billing
Required scope: read:billing
Support Tickets
Required scope: read:tickets / write:tickets
Notifications
Required scope: read:notifications
Webhooks
Webhooks let Adonis notify your server in real-time when events occur. Adonis sends a POST request to your configured endpoint with a JSON payload.
Required scope: manage:webhooks
Webhook Payload
{
"event": "subscription.renewed",
"timestamp": "2024-01-15T10:30:00+00:00",
"data": {
"subscription_id": 42,
"plan_name": "Business",
"user_id": 7,
"renewed_at": "2024-01-15T10:30:00Z"
}
}
Webhook Events Reference
| Event | Triggered when |
|---|---|
subscription.created | A new subscription is started |
subscription.renewed | Subscription is successfully renewed |
subscription.cancelled | Subscription is cancelled |
subscription.expired | Subscription expires without renewal |
license.activated | A license key is activated on a new site |
license.deactivated | A license activation is removed |
license.revoked | A license is revoked by an admin |
payment.received | A payment is approved |
payment.failed | A payment fails or is rejected |
user.created | New user account registered |
kyc.approved | KYC verification is approved |
kyc.rejected | KYC verification is rejected |
ticket.created | A new support ticket is opened |
ticket.replied | A reply is added to a ticket |
ticket.closed | A ticket is closed |
Signature Verification
Every webhook request includes an X-Adonis-Signature header. Verify it to confirm requests originate from Adonis:
// PHP
function verifyWebhook(string $payload, string $secret, string $header): bool {
if (strpos($header, 'sha256=') !== 0) return false;
$expected = 'sha256=' . hash_hmac('sha256', $payload, $secret);
return hash_equals($expected, $header);
}
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_ADONIS_SIGNATURE'] ?? '';
if (!verifyWebhook($payload, 'wh_your_secret', $signature)) {
http_response_code(401);
exit;
}
// Node.js
const crypto = require('crypto');
function verifyWebhook(payload, secret, header) {
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(header));
}
hash_equals / timingSafeEqual). Never use === to compare signatures — it is vulnerable to timing attacks.
Service Accounts
Service accounts are named identities for automated processes within your organization. They can be assigned specific scopes and used to generate dedicated API keys.
Changelog
v1.3 — Developer Platform
- Added API key authentication (
adw_live_prefix) - Added scoped permissions for API keys
- Added webhook delivery system with HMAC-SHA256 signatures
- Added
/v1/developer/*endpoints for key/webhook management - Added request logging and usage analytics
- Added service accounts
v1.2 — Organizations & Subscriptions
- Multi-tenant organizations with role-based access control
- Team invitations, seat limits, and member management
- Subscription plans, billing cycles, trial periods, and grace periods
v1.1 — Core Platform
- JWT authentication, license management, wallet, KYC, and support tickets
Questions? Open a support ticket or visit your developer dashboard.