Quickstart

Get started with Aidkit in minutes

Get Aidkit up and running in your application with just a few lines of code.

Installation

Add the Aidkit script to your application. You can include it in your HTML or load it dynamically.

<script src="https://aidkit.co/scripts/aidkit.min.js"></script>

Or load it dynamically:

const script = document.createElement("script");
script.src = "https://aidkit.co/scripts/aidkit.min.js";
document.head.appendChild(script);

Initialize Aidkit

Once the script is loaded, initialize Aidkit with your organization's API key:

window.Aidkit.init({
  apiKey: "your-api-key",
});
Tip

You can find your API key in the Settings > API Keys section of your dashboard.

Basic Configuration

The init function accepts a configuration object with the following options:

window.Aidkit.init({
  apiKey: "your-api-key",
  // Pre-fill user information (optional)
  // We only support email and name
  defaultValues: {
    name: "John Doe",
    email: "john@example.com",
  },
  // Redirect after submission (optional)
  redirectUrl: "/thank-you",
  // Custom metadata to attach to tickets (optional)
  metadata: {
    userId: "12345",
    plan: "pro",
  },
});

What's Next?