API Documentation

Welcome to the X0 Start API documentation. Our platform provides powerful tools to help you validate your business ideas through email subscription, 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 subscription 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

AI Integration

Build for AI Agents

X0 Start is built to be AI-friendly. We provide machine-readable specifications that allow AI agents to automatically discover and integrate with your site's API.

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 subscription 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 Subscription 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 Subscription -->
<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 Optional String 'light' Color scheme: 'light' or 'dark'
Option Type Default Description
title Optional String 'Join Our Waitlist' Main title
description Optional String null Description text
includeName Optional Boolean false Show name field
nameRequired Optional Boolean false Make name required
buttonText Optional String 'Subscribe' Button text
successMessage Optional String 'Thanks!' Success message
type Optional String null Category/Tag for the subscription
enableOptions Optional Boolean false Enable selection options
options Optional Array [] List of options for selection
multipleSelection Optional Boolean false Allow multiple option selection
Option Type Default Description
title Optional String 'Have Feedback?' Main title
description Optional String 'We'd love to hear' Description
buttonText Optional String 'Send Feedback' Button text
successMessage Optional String 'Thank you!' Success message
type Optional String null Feedback category (e.g., "bug", "feature")
options Optional Object/JSON null Additional metadata fields
Option Type Default Description
title Optional String 'Chat with us' Header title
inline Optional Boolean false Inline vs floating
defaultOpen Optional Boolean false Open by default
welcomeMessage Optional String 'Hi there!' Initial message
Option Type Default Description
title Optional String null Main title of the widget
description Optional String null Text displayed below the title
includeRating Optional Boolean true Show interactive 5-star rating input (defaults to 5 stars if false)
reviewPlaceholder Optional String 'Share your experience...' Placeholder for review textarea (500 char limit with counter)
buttonText Optional String 'Submit Review' Text for the submission button
successMessage Optional String 'Thank you for your review!' Message shown on successful submission
thankYouSubtitle Optional String 'Your feedback is important to us!' Subtitle shown in thank you banner after submission
Option Type Default Description
title Optional String null Main title of the widget
displayMode Optional String 'carousel' Display mode: 'carousel' (slideshow), 'grid' (responsive grid), or 'list' (vertical stack)
showRating Optional Boolean true Display star ratings for each review
showPosition Optional Boolean true Display reviewer position
showCompany Optional Boolean true Display reviewer company
showWebsite Optional Boolean true Display reviewer website link with favicon
showFavicon Optional Boolean true Display website favicon next to website link
autoRotate Optional Boolean true Auto-rotate reviews in carousel mode (pauses on hover)
rotateInterval Optional Number 5000 Milliseconds between auto-rotation (carousel mode only)
maxReviews Optional Number 20 Maximum number of reviews to fetch and display
showOnlyFeatured Optional 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/subscribe

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/subscribe \
  -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]",
  "type": "general",
  "options": {
    "category": "suggestion",
    "priority": "high"
  }
}
Request Parameters
Parameter Type Required Description
feedback String Yes The main content of the feedback or inquiry.
name String No Name of the person submitting the feedback.
email String No Contact email address.
type String No Category classification (e.g., 'service_inquiry', 'bug', 'feature').
options Object No Additional metadata or structured key-value pairs.

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": "[email protected]",
  "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": "[email protected]",
    "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 Subscription 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