Authentication
User authentication and authorization endpoints including OAuth2 (Google, GitHub)
Authenticate user with email and password
Request payload for user login
User's password
SecurePass@123User authenticated successfully
Invalid login data format or missing required fields.
Invalid email or password.
User not found with the provided email.
Internal server error occurred while authenticating user.
Logout user and invalidate authentication tokens
User logged out successfully
Missing or invalid authentication token.
Internal server error occurred while logging out user.
Generate a new access token using a valid refresh token
Request payload for refreshing access token
Valid refresh token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Access token refreshed successfully
Invalid refresh token format or missing required fields.
Invalid or expired refresh token.
Internal server error occurred while refreshing token.
Send password reset email
Request payload for initiating password reset
Email address of the account to reset password for
[email protected]Password reset email sent
Invalid email format or missing required fields.
User not found with the provided email.
Internal server error occurred while sending reset email.
Reset user password using the reset token received via email
Request payload for resetting user password
Password reset token received via email
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDAwIiwiaWF0IjoxNjkxOTYyMzQ1LCJleHAiOjE2OTE5NjU5NDV9.signatureNew password for the user account. Must be at least 8 characters long, and contain at least one uppercase letter, one lowercase letter, one digit, and one special character.
NewSecurePass@123Password reset successfully
Invalid reset token, password format, or missing required fields.
Invalid or expired reset token.
User not found with the provided reset token.
Internal server error occurred while resetting password.
Redirect user to Google OAuth2 authorization URL. Backend generates secure state parameter.
Optional client redirect URL. Must be validated against a backend whitelist (e.g., https://app.neevai.com/, https://staging.neevai.com/). If not provided or invalid, the backend will use a default redirect URL.
https://app.neevai.com/dashboardOptional invitation token for joining an organization
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Optional referral code for refer-and-earn attribution
AB12CD34EFRedirect to Google OAuth2 authorization URL with server-generated state
Invalid request or redirect_url not allowed.
Internal server error occurred while initiating OAuth flow.
No content
Redirect user to GitHub OAuth2 authorization URL. Backend generates secure state parameter.
Optional client redirect URL. Must be validated against a backend whitelist (e.g., https://app.neevai.com/, https://staging.neevai.com/). If not provided or invalid, the backend will use a default redirect URL.
https://app.neevai.com/dashboardOptional invitation token for joining an organization
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Optional referral code for refer-and-earn attribution
AB12CD34EFRedirect to GitHub OAuth2 authorization URL with server-generated state
Invalid request or redirect_url not allowed.
Internal server error occurred while initiating OAuth flow.
No content
Handle OAuth2 callback from providers and return authentication result
Authorization code from OAuth provider
State parameter containing redirect URL and security nonce
Error code from OAuth provider
Error description from OAuth provider
Redirect to client application with user session token or error information. Success: Redirects to UI with token in query parameter. Error: Redirects to UI with error and error_description in query parameters.
Redirect to client application with user session token or error information. Success: Redirects to UI with token in query parameter. Error: Redirects to UI with error and error_description in query parameters.
No content
Create a new user account with email, password, and personal details
Optional invitation token for joining an organization
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Optional referral code for refer-and-earn attribution
AB12CD34EFRequest payload for creating or updating a user
Valid phone number for the user account
+14155552671Pattern: ^\+[1-9][0-9]{7,14}$Secure password for the user account. Must be at least 8 characters long, and contain at least one uppercase letter, one lowercase letter, one digit, and one special character.
SecurePass@123User's first name
JohnPattern: ^[A-Za-z\-']+$User's middle name (optional)
MichaelPattern: ^[A-Za-z\-']+$User's last name
DoePattern: ^[A-Za-z\-']+$User registered successfully
Invalid user data format or missing required fields.
Email already exists.
Internal server error occurred while registering user.
Verify email address using OTP code
Request payload for email verification
OTP verification code sent to email
123456Pattern: ^[0-9]{6}$Email verified successfully
Invalid verification code or missing required fields.
Invalid or expired verification code.
User not found or email already verified.
Internal server error occurred while verifying email.
Verify phone number using OTP code
Request payload for phone verification
OTP verification code sent to phone
654321Pattern: ^[0-9]{6}$Phone number verified successfully
Invalid verification code or missing required fields.
Invalid or expired verification code.
User not found or phone already verified.
Internal server error occurred while verifying phone.
Resend verification code for email or phone
Request payload for resending verification code
Type of verification to resend
emailPossible values: Verification code sent successfully
Invalid request or missing required fields.
User not found.
Too many requests. Please wait before requesting another code.
Internal server error occurred while sending verification code.
Last updated