HealthKareAI
Clinic-App
hospital
Verifyotp

Verify Hospital OTP API Endpoint

POST /otpVerify

This endpoint verifies the OTP sent to the hospital owner during the login process.

Request Body

FieldTypeDescription
ownerPhoneStringThe contact number of the hospital owner
otpStringOTP sent to the hospital owner's phone

Responses

JSON Response

OTP successfully verified and user authenticated.

Response Body:

{
  "message": "OTP verified",
  "token": "Authentication token"
}

401 Unauthorized

OTP verification failed or OTP is incorrect.

Response Body:

{
  "message": "Unauthorized"
}

500 Internal Server Error

An unexpected error occurred.

Response Body:

{
  "error": "Error message"
}