# Creating a New Account

Interactions with chatbot data through our API endpoints necessitate secure authentication to ensure that operations are performed safely and only by authorized users. This measure is vital to protect your data and the integrity of your chatbots.

To facilitate seamless access, our API supports both the creation of new accounts for first-time users and the authentication of existing accounts for returning users. Below, we guide you through the process of creating a new account, setting the foundation for you to leverage the full capabilities of Karabo.ai.

There are three steps to creating a new account:

  1. Step 1: Email Address Verification
  2. Step 2: Submit Verification Code
  3. Step 3: Complete Subscription Payment

The API access is only available to subscribed members of karabo.ai - therefore you will need to make a payment before you can receive an API access token for all the other routes.

# Step 1: Email Address Verification

This endpoint is designed for submitting a valid email address to which we will send a verification code. Ensure you have access to the email address you intend to use before proceeding with this endpoint.

Endpoint: POST https://karabo.ai/api/v1.0/create-subscription/ Alongside your email address, kindly provide a return URL. The redirect URL will be forwarded to the payment processor to guide users to a designated page following successful or unsuccessful payments.

Request body:

{
  "email_address": "jonsnow@gmail.com",
  "return_url": "https://karabo.ai"
}

When you supply an email address we will check to confirm that you are not an existing user, existing users should use the login endpoint.

Success response for new users:

{
  "response": "A verification code has been sent to the email you provided, use the verification_code endpoint to continue"
}

When you receive this verification code, move on to Step 2.

If you are an existing user, but do not have a subscription attached to your account, a payment link will be returned instead. Success response for existing users:

{
  "payment_url": "https://stripe-payment-link-will-be-sent"
}

If you have received a payment link, make the payment and you can then use the login endpoint to obtain an API access token.

# Step 2: Submit Verification Code

This endpoint is created to accept and verify the the code sent from Step 1 above. It accepts both the email address and code in a POST request.

Endpoint: POST https://karabo.ai/api/v1.0/verification-code/ Alongside your email address, kindly provide a return URL. The redirect URL will be forwarded to the payment processor to guide users to a designated page following successful or unsuccessful payments.

Request body:

{
  "email_address": "jonsnow@gmail.com",
  "code": 12345,
  "return_url": "https://karabo.ai"
}

Success response:

{
  "payment_url": "https://stripe-payment-link-will-be-sent"
}

Proceed to make payment, then retrieve your API access code in the login endpoints.

# Step 3: Complete Subscription Payment

The provided payment URL directs you to a secure, Stripe-hosted page for processing your subscription payment. Once your payment is successfully made, Stripe automatically notifies Karabo.ai—no additional actions are needed on your part. Your account will be instantly upgraded, granting you immediate access to a login access code.