Credentials Authentication

Sign in and sign up using email and password

POST
/auth/signup-with-credentials
Sign Up with Credentials
Create a new user account with email and password

Request Body

Request
{
  "account_type": "creator",
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "password": "Pa$$w0rd!",
  "phone": "+251911223344",
  "confirm_password": "Pa$$w0rd!"
}

Response

Response (200 OK)
{
  "data": {
    "user": {
      "id": "c7ddc0c2-248b-462d-a0c3-d723621b2c75",
      "referenceId": "ByF-USR-57988B",
      "fullName": "John Doe",
      "email": "john.doe@example.com",
      "phoneNumber": "+251911223344",
      "role": "Creator",
      "accountStatus": "Active",
      "emailVerified": false,
      "createdAt": "2025-08-31T13:00:46.843Z"
    },
    "token": {
      "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
      "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
      "expiresIn": 5184000
    }
  },
  "message": "Successfully signed up with credentials",
  "success": true
}
POST
/auth/signin-with-credentials
Sign In with Credentials
Authenticate with email and password

Request Body

Request
{
  "email": "john.doe@example.com",
  "password": "Pa$$w0rd!"
}

Response

Response (200 OK)
{
  "data": {
    "user": {
      "id": "c7ddc0c2-248b-462d-a0c3-d723621b2c75",
      "referenceId": "ByF-USR-57988B",
      "fullName": "John Doe",
      "email": "john.doe@example.com",
      "role": "Creator",
      "accountStatus": "Active"
    },
    "token": {
      "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
      "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
      "expiresIn": 5184000
    }
  },
  "message": "Successfully signed in",
  "success": true
}