API Documentation

Welcome to the X0 Start API documentation. Our platform provides powerful tools to help you validate your business ideas through email capture, feedback collection, and AI-powered chat.

For Subscribers

Already have an account? Visit your site settings page to get your personalized API token and site-specific setup instructions with live verification.

Getting Started

X0 Start offers two main ways to integrate with your website:

Widget Integration

Add our JavaScript widget to your site for instant access to email capture forms, feedback widgets, and AI chatbot with minimal code.

Learn More
REST API

Build custom integrations using our RESTful API endpoints for complete control over data collection and user interactions.

Learn More

Authentication

All API requests require authentication using a site-specific API token. This token is provided when you create a site in your X0 Start account.

Authentication Methods
1. HTTP Header (Recommended for API calls)
X-Site-Token: your_api_token_here
2. Meta Tag (For widget verification)
<meta name="x0-site-verification" content="your_api_token_here" />
3. Script URL Parameter (For static sites)
<script src="https://www.x0start.com/widget.js?token=your_api_token_here"></script>
Security Note: Keep your API token secure. While it's safe to use in client-side code for widget integration, avoid exposing it unnecessarily in public repositories.

Widget Integration

Our widget provides pre-built UI components that you can easily add to your website. It includes email capture forms, feedback widgets, and an AI-powered chatbot.

JavaScript API

Load the widget script and use the global DomainWidget object to programmatically render components.

Step 1: Add the Script
<!-- Add to your HTML head or body -->
<meta name="x0-site-verification" content="YOUR_API_TOKEN" />
<script src="https://www.x0start.com/widget.js" async defer></script>
Step 2: Render Widgets
// Email Capture Form
DomainWidget.renderEmailCapture('email-container', {
  title: 'Join Our Waitlist',
  description: 'Be the first to know when we launch!',
  buttonText: 'Sign Up',
  includeName: true
});

// Feedback Form
DomainWidget.renderFeedbackForm('feedback-container', {
  title: 'Share Your Thoughts',
  description: 'We value your feedback!'
});

// Chatbot (Inline)
DomainWidget.renderChatbot('chatbot-container', {
  inline: true,
  welcomeMessage: 'Hi! How can I help you today?'
});

// Chatbot (Floating Button)
DomainWidget.renderChatbot('chatbot-floating', {
  inline: false,
  defaultOpen: false
});

HTML Attributes

For a simpler setup, use HTML data attributes. The widget will automatically detect and render these elements.

<!-- Email Capture -->
<div data-domain-widget="email-capture"
     data-title="Join Our Waitlist"
     data-description="Be the first to know!"
     data-button-text="Sign Up"
     data-include-name="true"></div>

<!-- Feedback Form -->
<div data-domain-widget="feedback-form"
     data-title="Share Your Thoughts"></div>

<!-- Floating Chatbot -->
<div data-domain-widget="chatbot"
     data-default-open="false"></div>

Widget Customization Options

Option Type Default Description
theme String 'light' Color scheme: 'light' or 'dark'
Option Type Default Description
title String 'Join Our Waitlist' Main title
description String null Description text
includeName Boolean false Show name field
nameRequired Boolean false Make name required
buttonText String 'Subscribe' Button text
successMessage String 'Thanks!' Success message
type String null Category
enableOptions Boolean false Enable options
options Array [] Option list
multipleSelection Boolean false Multiple select
Option Type Default Description
title String 'Have Feedback?' Main title
description String 'We'd love to hear' Description
buttonText String 'Send Feedback' Button text
successMessage String 'Thank you!' Success message
Option Type Default Description
title String 'Chat with us' Header title
inline Boolean false Inline vs floating
defaultOpen Boolean false Open by default
welcomeMessage String 'Hi there!' Initial message

REST API

Use our REST API for custom integrations. All endpoints require the X-Site-Token header.

Base URL: https://api.x0start.com

POST /api/v1/email-capture

Capture email addresses for waitlists, newsletters, or early access programs.

Headers
Content-Type: application/json
X-Site-Token: YOUR_API_TOKEN
Request Body
{
  "email": "[email protected]",
  "name": "John Doe",
  "type": "waitlist",
  "options": {
    "selected": ["Feature A"],
    "custom": "Additional info"
  }
}
cURL Example
curl -X POST https://api.x0start.com/api/v1/email-capture \
  -H "Content-Type: application/json" \
  -H "X-Site-Token: YOUR_API_TOKEN" \
  -d '{"email": "[email protected]", "type": "waitlist"}'

POST /api/v1/feedback

Collect user feedback and suggestions.

Request Body
{
  "feedback": "This is great!",
  "name": "Jane Doe",
  "email": "[email protected]"
}
cURL Example
curl -X POST https://api.x0start.com/api/v1/feedback \
  -H "Content-Type: application/json" \
  -H "X-Site-Token: YOUR_API_TOKEN" \
  -d '{"feedback": "This is great!"}'

POST /api/v1/chat

Send messages to the AI chatbot and receive responses.

Request Body
{
  "message": "What features do you offer?",
  "sessionId": "unique-session-id",
  "endUserId": "user-123",
  "domain": "example.com"
}
cURL Example
curl -X POST https://api.x0start.com/api/v1/chat \
  -H "Content-Type: application/json" \
  -H "X-Site-Token: YOUR_API_TOKEN" \
  -d '{"message": "Hello!", "sessionId": "session-123"}'

Widget Events

Listen to custom events emitted by the widgets to track user interactions.

Email Capture Success
document.getElementById('email-container')
  .addEventListener('dw-email-capture-success', function(event) {
    console.log('Email captured:', event.detail.email);
  });
Feedback Submission Success
document.getElementById('feedback-container')
  .addEventListener('dw-feedback-success', function(event) {
    console.log('Feedback submitted:', event.detail);
  });

Complete Examples

Landing Page with All Widgets

<!DOCTYPE html>
<html>
<head>
  <meta name="x0-site-verification" content="YOUR_API_TOKEN">
  <title>My Startup</title>
</head>
<body>
  <h1>Welcome to My Startup</h1>
  
  <div id="email-widget"></div>
  <div id="feedback-widget"></div>
  <div id="chatbot"></div>

  <script src="https://www.x0start.com/widget.js" async></script>
  <script>
    window.addEventListener('DOMContentLoaded', function() {
      if (typeof DomainWidget !== 'undefined') {
        initWidgets();
      } else {
        window.addEventListener('domain-widget-loaded', initWidgets);
      }
      
      function initWidgets() {
        DomainWidget.renderEmailCapture('email-widget', {
          title: 'Join Our Waitlist',
          includeName: true
        });
        
        DomainWidget.renderFeedbackForm('feedback-widget');
        DomainWidget.renderChatbot('chatbot', { inline: false });
      }
    });
  </script>
</body>
</html>

Need Help?

If you have questions or need assistance with integration, please don't hesitate to reach out.

Contact Support Sign Up