Skip to content

User Management

Manage your Pro user profile and accounts.

Pro Login

POST /api/user/login

Request:

json
{
  "email": "user@example.com",
  "password": "yourpassword"
}

Response (200):

json
{
  "user_id": "...",
  "email": "user@example.com",
  "plan": "pro",
  "status": "active",
  "downgraded": false
}

Session token is set via cookie. For API integrations, use a Pro API Token instead.

OAuth Users

If you signed up with Google or GitHub, you don't have a password and cannot use this endpoint. Create a Pro API Token in the Pro dashboard to access the API programmatically.

Pro Registration

POST /api/user/register

Request:

json
{
  "email": "user@example.com",
  "password": "yourpassword"
}

Response (201):

json
{
  "user_id": "...",
  "email": "user@example.com",
  "plan": "pro",
  "status": "pending"
}

Session token is set via cookie. Password must be 8-72 characters with at least 1 letter and 1 digit.

Get Profile

GET /api/user/me

Response (200):

json
{
  "id": "...",
  "email": "user@example.com",
  "plan": "pro",
  "role": "user",
  "status": "active",
  "max_accounts": 10,
  "max_domains": 3,
  "account_count": 2,
  "domain_count": 1,
  "created_at": "2025-01-15T10:30:00Z",
  "downgraded": false
}

List All Accounts

GET /api/user/accounts

Lists all email accounts owned by the Pro user.

Response (200):

json
{
  "accounts": [
    {
      "id": "a1b2c3d4-...",
      "address": "hello@mydomain.com",
      "quota": 52428800,
      "used": 1234567,
      "created_at": "2025-01-15T10:30:00Z"
    }
  ]
}

Use the id from this list as {account_id} in the unified API endpoints:

bash
GET /api/accounts/{account_id}/messages

Password Reset

Request Reset

POST /api/user/password-reset-request
json
{ "email": "user@example.com" }

Always returns 200 regardless of whether the email exists (prevents enumeration).

Reset Password

POST /api/user/password-reset
json
{
  "token": "reset-token-from-email",
  "password": "newpassword123"
}

This invalidates all existing JWTs and revokes all API tokens.

Mail.td API Documentation