SimplaixSimplaix Gateway
Reference

Auth & Pairing

Authentication, profile, and mobile-device pairing endpoints.

Endpoint Map

MethodPathAuthPurpose
POST/api/v1/auth/loginNoneVerify email/password and issue login JWT
POST/api/v1/auth/verify-credentialsNoneVerify email/password without issuing JWT
GET/api/v1/auth/meJWTGet current user profile
PUT/api/v1/auth/meJWTUpdate current user profile
POST/api/v1/auth/change-passwordJWTChange current user password
POST/api/v1/auth/pairing-codeFlexible authCreate short-lived pairing token + deep link
GET/api/v1/auth/pair-link/:codeNoneRender HTML redirect page for app pairing
POST/api/v1/auth/pairPairing tokenExchange pairing token for long-lived device JWT

Login

POST /api/v1/auth/login
Content-Type: application/json

{
  "email": "admin@example.com",
  "password": "secret"
}
{
  "success": true,
  "token": "<jwt>",
  "user": {
    "id": "usr_...",
    "email": "admin@example.com",
    "name": "Admin",
    "tenantId": "tnt_...",
    "roles": ["admin"]
  }
}

Verify Credentials (No JWT)

POST /api/v1/auth/verify-credentials
Content-Type: application/json

{
  "email": "admin@example.com",
  "password": "secret"
}

Used by management apps that mint JWTs themselves.

Current Profile

GET /api/v1/auth/me
Authorization: Bearer <jwt>

Update Profile

PUT /api/v1/auth/me
Authorization: Bearer <jwt>
Content-Type: application/json

{
  "name": "Updated Name",
  "email": "new@example.com"
}

Change Password

POST /api/v1/auth/change-password
Authorization: Bearer <jwt>
Content-Type: application/json

{
  "currentPassword": "old-pass",
  "newPassword": "new-pass-123"
}

Device Pairing Flow

  1. Runtime calls POST /api/v1/auth/pairing-code with flexible auth and peerId.
  2. Gateway returns { token, deepLink }.
  3. Mobile app opens deepLink and then calls POST /api/v1/auth/pair with:
{
  "pairingToken": "...",
  "pushToken": "...",
  "platform": "ios",
  "deviceName": "iPhone 16"
}

/pair response:

{
  "token": "<device-jwt>",
  "gatewayUrl": "https://...",
  "peerId": "usr_..."
}

On this page