Skip to main content
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

email
string
required
The email address associated with your account.
password
string
required
Your account password.

Response

success
boolean
true when authentication succeeds.
data
object

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"
}