Auth API

The auth service is the identity, billing, and team-management plane. Base URL: https://cloudnx.in/auth/.

Sessions

MethodPathPurpose
POST/auth/registerEmail + password sign-up. Returns access + refresh tokens.
POST/auth/loginSign in. May return {requires_2fa, pending_token} for MFA users.
POST/auth/2fa/login-verifySubmit OTP + pending token to complete MFA login.
POST/auth/refreshExchange refresh token for a new access pair.
POST/auth/forgot-passwordEmail a password-reset link.
POST/auth/reset-passwordSubmit token + new password.
POST/auth/verify-emailSubmit 6-digit OTP to verify email.
GET/auth/meCurrent user (root or IAM) profile.

IAM

MethodPathPurpose
POST/auth/iam-loginIAM user sign-in (account_id + username + password).
POST/auth/iam-login/verifyOTP step for MFA-enabled IAM users.
POST/auth/iam/exchange-credentialsExchange access key (SigV4 or body secret) for a 15-min JWT.
GET / POST/auth/iam/usersList or create IAM users.
DELETE/auth/iam/users/{username}Delete an IAM user (cascades policies + keys).
PATCH/auth/iam/users/{username}/passwordSet, reset, or disable console password.
GET / POST / DELETE/auth/iam/users/{username}/access-keys[/{id}]Manage programmatic credentials.
GET / POST / DELETE/auth/iam/policies[/{id}]List managed + custom policies; create or delete custom.
GET / POST / DELETE/auth/iam/groups[/{name}]Group CRUD.
GET / POST/auth/iam/me/mfa[/setup,enable,disable]IAM user’s own TOTP MFA.
GET / PUT/auth/account/password-policyPer-account password rules.

Billing

MethodPathPurpose
GET/auth/billingWallet balance, MTD spend, projection, runway, history, daily trend.
POST/auth/billing/topupCreate a Razorpay order for manual top-up.
GET/auth/billing/transactionsWallet credit history.
GET / PATCH/auth/billing/tax-profileGSTIN + legal name for tax invoices.
GET/auth/billing/invoices[/{id}]List or download tax invoices.
GET / POST / PATCH / DELETE/auth/billing/autopay[/setup,activate]Razorpay mandate lifecycle.
GET / POST/auth/billing/subscription[s,e,…]Razorpay Subscriptions plan management.

Teams

MethodPathPurpose
POST/auth/team/inviteInvite by email + role.
GET / DELETE/auth/team/invites[/{id}]List / revoke pending invites.
POST/auth/team/acceptAccept invite (requires logged-in session).
GET/auth/team/invite/infoPublic — invite-token info for the /join page.
GET / DELETE/auth/team/members[/{id}]List or remove team members.

Audit logs

GET /auth/audit-logs returns the 200 most recent state-changing requests for the calling user’s billing account. Filter via query string: ?service=compute&method=POST&q=instances.

Curl example

curl -X POST https://cloudnx.in/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]","password":"…"}'

See Compute API next.