User

Create a new user (email)

POST /v1/user/register/email

Register new user with its email. New user will be set status to be "PENDING".

This API sends one email to requested email with Redirect URL. URL have token in its query parameter to be used in Login user (email) API.

Body

Name
Type
Description

email

string

email address of new user

Response

{
  "id": "user_01j50svzfsttebtyxzdagw5gq5",
  "register_type": "EMAIL",
  "name": "dev@jaehong21.com",
  "email": "dev@jaehong21.com",
  "password_hash": null,
  "status": "PENDING",
  "created_at": "2024-08-11 13:25:58",
  "updated_at": "2024-08-11 13:25:58"
}

Login user (email)

POST /v1/user/login/email

Login user that is registered by email. The JWT token must be added to the header from email received by Create a new user (email).

Headers

Name
Value

Authorization

Bearer <token>

Response

{
  "id": "user_01j50svzfsttebtyxzdagw5gq5",
  "register_type": "EMAIL",
  "name": "dev@jaehong21.com",
  "email": "dev@jaehong21.com",
  "password_hash": null,
  "status": "ACTIVE",
  "created_at": "2024-08-11 13:25:58",
  "updated_at": "2024-08-11 14:09:47",
  "token": "<token>"
}

Find my Info

GET /v1/user/me

Fetch my user information.

Headers

Name
Value

Authorization

Bearer <token>

Response

{
  "id": "user_01j4s9x5m1h0qc73a4xzq2ef77",
  "register_type": "EMAIL",
  "name": "support@uptimeninja.io",
  "email": "support@uptimeninja.io",
  "password_hash": null,
  "status": "ACTIVE",
  "created_at": "2024-08-08 15:32:19",
  "updated_at": "2024-08-11 14:13:30"
}

Last updated