Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Sumitbose5/tktplz/llms.txt

Use this file to discover all available pages before exploring further.

TktPlz uses a passwordless email flow for both registration and login. When you submit your email, TktPlz sends a 6-digit one-time code to that address. Enter the code to complete sign-in or account creation. The code is valid for 6 minutes and each email address can request only one OTP per 60-second window.

Registration

Attendee (user) registration

Attendee accounts require only a name and email address. There is no phone number or password required.
1

Submit your details

POST to /api/auth/user-reg with your name and email. TktPlz checks that the email is not already registered and sends a 6-digit OTP to your inbox.
{
  "name": "Priya Sharma",
  "email": "priya@example.com"
}
Response (200)
{
  "success": true,
  "message": "OTP sent successfully!"
}
2

Enter the OTP

POST to /api/auth/verify-otp with the code from your email. TktPlz creates your account and sets the tktplz_cookie session cookie.
{
  "email": "priya@example.com",
  "inputOtp": "482910"
}
Response (200)
{
  "success": true,
  "message": "You are allowed to access user panel",
  "role": "user",
  "userData": {
    "id": "a1b2c3d4-...",
    "name": "Priya Sharma",
    "email": "priya@example.com",
    "role": "user",
    "isVerified": true
  }
}

Organiser registration

Organiser accounts require a name, email, and a phone number. Phone numbers must be unique across the platform.
1

Submit your details

POST to /api/auth/orgn-reg with your name, email, and phone number.
{
  "name": "Rahul Events",
  "email": "rahul@eventco.in",
  "phoneNo": "9876543210"
}
Response (200)
{
  "success": true,
  "message": "OTP sent successfully!"
}
2

Enter the OTP

POST to /api/auth/verify-otp with the same email address and the 6-digit code.
{
  "email": "rahul@eventco.in",
  "inputOtp": "371042"
}
Response (200)
{
  "success": true,
  "message": "You are allowed to access organiser panel",
  "role": "organiser",
  "userData": {
    "id": "b5c6d7e8-...",
    "name": "Rahul Events",
    "email": "rahul@eventco.in",
    "role": "organiser"
  }
}
After a successful OTP verification, the browser is automatically redirected: attendees go to the home page (or the page they were originally trying to visit), while organisers are sent to /orgn/dashboard.

Login

Attendee login

1

Request an OTP

POST to /api/auth/user-login with your registered email. TktPlz verifies the email exists as an attendee account and sends a fresh OTP.
{
  "email": "priya@example.com"
}
Response (200)
{
  "success": true,
  "message": "OTP sent successfully",
  "email": "priya@example.com"
}
2

Verify the OTP

POST to /api/auth/verify-otp with the code from your email.
{
  "email": "priya@example.com",
  "inputOtp": "904571"
}
On success, TktPlz sets the tktplz_cookie and returns your user data.

Organiser login

1

Request an OTP

POST to /api/auth/orgn-login with your registered organiser email.
{
  "email": "rahul@eventco.in"
}
Response (200)
{
  "success": true,
  "message": "OTP sent successfully",
  "email": "rahul@eventco.in"
}
2

Verify the OTP

POST to /api/auth/verify-otp with your email and the OTP.
{
  "email": "rahul@eventco.in",
  "inputOtp": "613784"
}
Each login endpoint checks that the email belongs to the correct role. If you submit an organiser email to /api/auth/user-login (or vice versa), the API returns a 400 error: "This email is registered with a different role. Please use the appropriate login method."

OTP expiry and resend

  • Expiry: OTPs expire after 6 minutes (360 seconds). If you enter an expired code, /api/auth/verify-otp returns "OTP expired or not found. Request a new OTP."
  • Rate limit: You can request one OTP per 60 seconds per email address. Requesting again within that window returns a 429 response: "You can request a new OTP after 1 minute."
  • Resend: To get a new code, submit the registration or login form again after 60 seconds have passed.
Check your spam folder if the OTP email does not arrive within a few seconds. The email is sent from TktPlz immediately after a successful API call.

API endpoint reference

EndpointMethodPurpose
/api/auth/user-regPOSTRegister a new attendee account
/api/auth/orgn-regPOSTRegister a new organiser account
/api/auth/verify-otpPOSTVerify OTP for both registration and login
/api/auth/user-loginPOSTRequest a login OTP for an existing attendee
/api/auth/orgn-loginPOSTRequest a login OTP for an existing organiser

Build docs developers (and LLMs) love