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
Option Type Default Description
title String null Main title of the widget
description String null Text displayed below the title
includeRating Boolean true Show interactive 5-star rating input (defaults to 5 stars if false)
reviewPlaceholder String 'Share your experience...' Placeholder for review textarea (500 char limit with counter)
buttonText String 'Submit Review' Text for the submission button
successMessage String 'Thank you for your review!' Message shown on successful submission
thankYouSubtitle String 'Your feedback is important to us!' Subtitle shown in thank you banner after submission
Option Type Default Description
title String null Main title of the widget
displayMode String 'carousel' Display mode: 'carousel' (slideshow), 'grid' (responsive grid), or 'list' (vertical stack)
showRating Boolean true Display star ratings for each review
showPosition Boolean true Display reviewer position
showCompany Boolean true Display reviewer company
showWebsite Boolean true Display reviewer website link with favicon
showFavicon Boolean true Display website favicon next to website link
autoRotate Boolean true Auto-rotate reviews in carousel mode (pauses on hover)
rotateInterval Number 5000 Milliseconds between auto-rotation (carousel mode only)
maxReviews Number 20 Maximum number of reviews to fetch and display
showOnlyFeatured Boolean false Only show reviews marked as featured

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": "user@example.com",
  "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": "user@example.com", "type": "waitlist"}'

POST /api/v1/feedback

Collect user feedback and suggestions.

Request Body
{
  "feedback": "This is great!",
  "name": "Jane Doe",
  "email": "jane@example.com"
}
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"}'

POST /api/v1/reviews

Submit a customer review or testimonial.

Request Body
{
  "reviewer_name": "Jane Smith",
  "reviewer_email": "jane@example.com",
  "reviewer_position": "CEO",
  "reviewer_company": "Acme Inc",
  "reviewer_website": "https://acme.com",
  "rating": 5,
  "review_text": "Excellent product! Highly recommend.",
  "invitation_token": "optional-token-if-from-invitation"
}
cURL Example
curl -X POST https://api.x0start.com/api/v1/reviews \
  -H "X-Site-Token: YOUR_SITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "reviewer_name": "Jane Smith",
    "reviewer_email": "jane@example.com",
    "rating": 5,
    "review_text": "Excellent product!"
  }'

GET /api/v1/reviews

Get visible reviews for display on your website.

Request Body
Query Parameters:
- limit: Number of reviews to return (default: 20)
- featured_only: Only return featured reviews (true/false)
cURL Example
curl -X GET "https://api.x0start.com/api/v1/reviews?limit=10&featured_only=true" \
  -H "X-Site-Token: YOUR_SITE_TOKEN"

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);
  });
Review Submission Success
document.addEventListener('x0:review:success', (event) => {
  console.log('Review submitted:', event.detail);
  // Track in analytics, show custom thank you, etc.
});

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