Skip to main content

Authentication APIs

Creating an Account​

To create an account, you need to send a POST request to our API with the account details. This will register a new account for your betting business.

Request​

PropertyValue
methodPOST
url$baseUrl/auth/register/account
Content-Typeapplication/json

Body​

PropertyTypeRequiredDefaultDescription
namestringYes-Name of the betting business
emailstringYes-Business email address
passwordstringYes-Account password
curl -X POST "$baseUrl/auth/register/account" \
-H "Content-Type: application/json" \
-d '{
"name": "My Betting Business",
"email": "business@example.com",
"password": "securepassword"
}'

Response​

Http Code: 201

{
"message": "Account created successfully"
}

Logging In​

To log in to your account, you need to send a POST request to our API with your email and password. This will authenticate your account and return a token.

Request​

PropertyValue
methodPOST
url$baseUrl/auth/login/account
Content-Typeapplication/json

Body​

PropertyTypeRequiredDefaultDescription
emailstringYes-Business email address
passwordstringYes-Account password
curl -X POST "$baseUrl/auth/login/account" \
-H "Content-Type: application/json" \
-d '{
"email": "business@example.com",
"password": "securepassword"
}'

Response​

Http Code: 201

{
"data": {
"token": "OCFUBbMIX4PGXb4ROw5xKVC8kW8tGSBh"
},
"message": "Logged into account successfully"
}

Logging Out​

To log out from your account, you need to send a POST request to our API. This will invalidate your authentication token.

Request​

PropertyValue
methodPOST
url$baseUrl/auth/logout/account

Headers​

PropertyRequiredValue
AuthorizationYesBearer ${token}

Params​

PropertyRequiredDefaultValue
logout_allNofalseIf the value is true all tokens associated with the account is logged out
curl -X POST "$baseUrl/auth/logout/account?logout_all=true" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json"

Response​

Http Code: 201

{
"message": "Logged out successfully"
}

Generate API Keys​

To generate API keys for your account, you need to send a POST request to our API. This will generate a new API key and secret for your account.

Request​

For this request, the request must be authorized using the Authorization header. The token is the data.token from the login response.

PropertyValue
methodPOST
url$baseUrl/auth/account/generate-keys
Content-Typeapplication/json

Headers​

PropertyRequiredValue
AuthorizationYesBearer ${token}
curl -X POST "$baseUrl/auth/account/generate-keys" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json"

Response​

Http Code: 201

{
"data": {
"api_key": "api_key_k4rBSsfzj6SyJbsKOT3YXRXsmKRZuYT4",
"api_secret": "api_secret_80d6bx3NNRsqELP6in2eVS56jSGyVNhiUtRMeImnUoJWc8DQYgLnwm1gH45PISQN",
"base64_encoded": "YXBpX2tleV9rNHJCU3Nmemo2U3lKYnNLT1QzWVhSWHNtS1JadVlUNDphcGlfc2VjcmV0XzgwZDZieDNOTlJzcUVMUDZpbjJlVlM1NmpTR3lWTmhpVXRSTWVJbW5Vb0pXYzhEUVlnTG53bTFnSDQ1UElTUU4="
},
"message": "Api keys generated successfully"
}

Verify Account Email​

To verify an account email, you need to send a GET request to our API with the verification token that was sent to the email address.

Request​

PropertyValue
methodGET
url$baseUrl/auth/account/verify-email?token=${token}

Params​

PropertyRequiredDescription
tokenYesThe verification token sent to the email address
curl -X GET "$baseUrl/auth/account/verify-email?token=your_verification_token"

Response​

Http Code: 200

{
"message": "Email verified successfully"
}

Resend Verification Email​

To resend a verification email, you need to send a POST request to our API. This will generate a new verification token and send it to the associated email address.

Request​

For this request, the request must be authorized using the Authorization header.

PropertyValue
methodPOST
url$baseUrl/auth/account/resend-verification-email
Content-Typeapplication/json

Headers​

PropertyRequiredValue
AuthorizationYesBearer ${token}
curl -X POST "$baseUrl/auth/account/resend-verification-email" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json"

Response​

Http Code: 200

{
"message": "Verification email sent successfully"
}

Reset Password​

Allows authenticated account users to reset their current password by providing their current password and a new password. This endpoint supports both Bearer token and API key authentication methods.

Request​

PropertyValue
methodPOST
url$baseUrl/auth/account/reset-password
Content-Typeapplication/json

Headers​

PropertyRequiredValue
AuthorizationYesBearer ${token} or Basic ${base64(api_key:api_secret)}

Body​

PropertyTypeRequiredDefaultDescription
passwordstringYes-Current account password
new_passwordstringYes-New password (minimum 8 characters)
password_confirmationstringYes-Confirmation of new password (must match)
# Using Bearer Token
curl -X POST "$baseUrl/auth/account/reset-password" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
"password": "current_password",
"new_password": "new_password_min_8_chars",
"password_confirmation": "new_password_min_8_chars"
}'

# Using API Key Authentication
curl -X POST "$baseUrl/auth/account/reset-password" \
-u "api_key:api_secret" \
-H "Content-Type: application/json" \
-d '{
"password": "current_password",
"new_password": "new_password_min_8_chars",
"password_confirmation": "new_password_min_8_chars"
}'

Response​

Http Code: 200

{
"message": "Password reset successfully"
}

Forgot Password​

Allows users to request a password reset by providing their email address. This endpoint generates a unique 8-character reset token and sends it via email. For security, it always returns success regardless of whether the email exists.

Request​

PropertyValue
methodPOST
url$baseUrl/auth/account/forgot-password
Content-Typeapplication/json

Body​

PropertyTypeRequiredDefaultDescription
emailstringYes-Email address for password reset
curl -X POST "$baseUrl/auth/account/forgot-password" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com"
}'

Response​

Http Code: 200

{
"message": "If an account with this email exists, a password reset email has been sent"
}

Create Password for Forgot Password​

Allows users to set a new password using the token received via email from the forgot password flow. This endpoint validates the token and creates the new password.

Request​

PropertyValue
methodPOST
url$baseUrl/auth/account/create-password-for-forgot-password
Content-Typeapplication/json

Body​

PropertyTypeRequiredDefaultDescription
emailstringYes-Email address associated with the reset token
tokenstringYes-8-character reset token from email
passwordstringYes-New password (minimum 8 characters)
password_confirmationstringYes-Confirmation of new password (must match)
curl -X POST "$baseUrl/auth/account/create-password-for-forgot-password" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"token": "12345678",
"password": "new_secure_password123",
"password_confirmation": "new_secure_password123"
}'

Response​

Http Code: 200

{
"message": "Password created successfully"
}

Account me​

To get the current authenticated account details, you need to send a GET request to our API. This endpoint returns information about the currently authenticated account.

Request​

For this request, the request must be authorized using the Authorization header. The token is the data.token from the login response.

PropertyValue
methodGET
url$baseUrl/auth/account/me
Content-Typeapplication/json

Authorization​

info

This request must have the authorization header. Refer to Authorization method guide for more details

curl -X GET "$baseUrl/auth/account/me" \
-H "Content-Type: application/json"

Response​

Http Code: 200

{
"data": {
"id": 2,
"name": "First Account",
"email": "first@email.com",
"email_verified_at": null,
"api_key_generated_at": null,
"preferences": {
"allow_negative_balance": false
},
"created_at": "2025-05-08T15:21:41.017Z",
"updated_at": "2025-05-08T15:21:41.017Z"
},
"message": "authentication data"
}