Skip to content

xAdmin API Reference

Complete API endpoint documentation for xAdmin authentication and billing service.


POST /v1/verify

Verify token validity, check expiration and balance, and automatically deduct quota.

Request

Headers

HeaderTypeRequiredDescription
AuthorizationStringBearer token in format Bearer <Token>
Content-TypeStringMust be application/json

Body Parameters

ParameterTypeRequiredDefaultDescription
countInteger1Consumption multiplier

Query Parameters

ParameterTypeRequiredDefaultDescription
dry_runBooleanfalseIf true, only validate without deducting quota

Request Example

bash
curl -X POST "https://api.xadmin.com/v1/verify" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{"count": 1}'

Response

Success Response (200 OK)

json
{
  "status": "ok",
  "remaining": "check-admin",
  "balance": 997768,
  "expires_at": 1735516800000
}
FieldTypeDescription
statusStringok indicates verification passed
balanceIntegerRemaining available balance (points)
expires_atInteger | nullExpiration timestamp in milliseconds, null means never expires

Error Responses

HTTP StatusError CodeDescription
401Missing TokenAuthorization header not provided
403Invalid TokenToken format is incorrect or token does not exist
403Token ExpiredToken has passed its expiration date
403Quota Exceeded or BannedBalance depleted or account is banned

Error Response Example

json
{
  "error": "Invalid Token",
  "message": "The provided token does not exist or has been revoked"
}

Response Codes Summary

Status CodeMeaningAction Required
200Verification successfulProceed with business logic
401Authentication missingPrompt user to provide token
403Access deniedBlock request, show error to user
500Server errorRetry or fail gracefully

Rate Limiting

xAdmin does not impose hard rate limits for authenticated requests. However, best practices recommend:

  • Implement client-side request throttling
  • Cache verification results for identical requests (with caution)
  • Monitor your usage through the xAdmin dashboard

Idempotency

The /v1/verify endpoint is not idempotent by default—each call deducts quota. Use dry_run=true for validation-only checks that don't affect balance.