Use this endpoint to log in to your Hyparrow account. A successful response includes a signed JWT that you pass as a Bearer token on authenticated endpoints.
Your email must be verified before you can log in. If you have not yet verified your email, use the Verify Email endpoint first.
Endpoint
POST https://api.hyparrow.com/api/v1/auth/login
Request body
The email address associated with your account.
Response
true when authentication succeeds.
A signed JWT valid for 24 hours. Pass this value in the Authorization header as Bearer <token> on all authenticated requests.
The user’s email address.
ISO 3166-1 alpha-2 country code.
The user’s state or region, if set.
The user’s postal code, if set.
URL of the user’s profile picture, if set.
Either personal or business.
One of pending, active, suspended, or deactivated.
One of not_started, in_progress, pending_review, approved, or rejected.
true when the user’s email address has been verified.
Using the token
Include the token in the Authorization header for all authenticated API calls:
Authorization: Bearer <token>
Tokens expire after 24 hours . Request a new token by calling this endpoint again.
Examples
curl -X POST https://api.hyparrow.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "ada.okafor@example.com",
"password": "SecurePass123"
}'
Success response
{
"success" : true ,
"data" : {
"token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkYS5va2Fmb3JAZXhhbXBsZS5jb20iLCJleHAiOjE3MDAwMDAwMDAsImlhdCI6MTY5OTkxMzYwMCwicm9sZSI6InVzZXIiLCJ1c2VySWQiOiJhMWIyYzNkNC1lNWY2LTc4OTAtYWJjZC1lZjEyMzQ1Njc4OTAifQ.signature" ,
"user" : {
"id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"firstName" : "Ada" ,
"lastName" : "Okafor" ,
"email" : "ada.okafor@example.com" ,
"country" : "NG" ,
"city" : "Lagos" ,
"state" : "Lagos" ,
"postalCode" : "100001" ,
"profilePicture" : "" ,
"role" : "user" ,
"accountType" : "business" ,
"accountStatus" : "active" ,
"kycStatus" : "not_started" ,
"emailVerified" : true
}
}
}
Error response
{
"success" : false ,
"error" : "invalid email or password"
}