Skip to content

Dashboard API

Dashboard Authentication

Register, log in, verify email, and reset passwords for your PacSpace account.

All dashboard endpoints live under https://balance-api.pacspace.io/dashboard/auth. These routes handle account creation, login, email verification, and password resets.


Register

Create a new PacSpace account. This is a public endpoint — no authentication required.

bash
curl -X POST https://balance-api.pacspace.io/dashboard/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@company.com",
    "password": "your-secure-password",
    "firstName": "Jane",
    "lastName": "Doe",
    "companyName": "Acme Inc"
  }'

Response 201 Created

json
{
  "statusCode": 201,
  "message": "Registration successful. Please check your email to verify your account.",
  "data": {
    "id": "usr_abc123",
    "email": "you@company.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "tenantId": "tnt_xyz789"
  }
}

A verification email is sent automatically. The account is inactive until the email is verified.


Login

Authenticate with your email and password. Returns a JWT access token.

bash
curl -X POST https://balance-api.pacspace.io/dashboard/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@company.com",
    "password": "your-secure-password"
  }'

Response 200 OK

json
{
  "statusCode": 200,
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIs...",
    "user": {
      "id": "usr_abc123",
      "email": "you@company.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "tenantId": "tnt_xyz789"
    }
  }
}

Use the accessToken in subsequent dashboard requests:

bash
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Verify Email

Confirm your email address using the token from the verification email. This is a GET request — typically triggered by clicking the link in the email.

bash
curl https://balance-api.pacspace.io/dashboard/auth/verify?token=VERIFICATION_TOKEN

Response 200 OK

json
{
  "statusCode": 200,
  "message": "Email verified successfully."
}

Request Password Reset

Send a password reset link to the account email.

bash
curl -X POST https://balance-api.pacspace.io/dashboard/auth/request-password-reset \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@company.com"
  }'

Response 200 OK

json
{
  "statusCode": 200,
  "message": "If that email exists, a reset link has been sent."
}

The response is intentionally vague to prevent email enumeration.


Reset Password

Set a new password using the token from the reset email.

bash
curl -X POST https://balance-api.pacspace.io/dashboard/auth/reset-password \
  -H "Content-Type: application/json" \
  -d '{
    "token": "RESET_TOKEN",
    "newPassword": "new-secure-password"
  }'

Response 200 OK

json
{
  "statusCode": 200,
  "message": "Password has been reset successfully."
}

Get Profile

Retrieve the currently authenticated user's profile. Requires a valid JWT.

bash
curl https://balance-api.pacspace.io/dashboard/auth/profile \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response 200 OK

json
{
  "statusCode": 200,
  "data": {
    "id": "usr_abc123",
    "email": "you@company.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "tenantId": "tnt_xyz789",
    "emailVerified": true,
    "createdAt": "2025-01-15T10:30:00.000Z"
  }
}

Authentication Summary

EndpointMethodAuth Required
/dashboard/auth/registerPOSTNo
/dashboard/auth/loginPOSTNo
/dashboard/auth/verifyGETNo (token in query)
/dashboard/auth/request-password-resetPOSTNo
/dashboard/auth/reset-passwordPOSTNo (token in body)
/dashboard/auth/profileGETJWT
Was this page helpful?

Last updated February 11, 2026