API Documentation

Integrate Litmusly's AI-powered user testing directly into your applications and workflows.

API Overview

RESTful API
Our API follows REST principles with predictable resource-oriented URLs and standard HTTP methods.

The Litmusly API is organized around REST. It has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

https://api.litmusly.com/v1/tests
Authentication
Secure your API requests with API keys or OAuth 2.0 for more complex integrations.

The Litmusly API uses API keys to authenticate requests. You can view and manage your API keys in the Litmusly Dashboard. Your API keys carry many privileges, so be sure to keep them secure.

Authorization: Bearer YOUR_API_KEY
Responses
All API responses are returned in JSON format with consistent structure and error handling.

The Litmusly API returns responses in JSON format. Successful responses include a data object with the requested information. Error responses include an error object with details about what went wrong.

{ "data": { ... }, "meta": { ... } }
Rate Limiting
Our API implements rate limiting to ensure fair usage and optimal performance for all users.

The Litmusly API implements rate limiting to ensure stability and fair usage. Rate limits vary based on your plan. The API returns headers with your current rate limit status.

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 98

Getting Started

Quick Start Guide
Follow these steps to start using the Litmusly API
  1. 1

    Create an API Key

    Log in to your Litmusly dashboard and navigate to the API section to create your API key.

    YOUR_API_KEY
  2. 2

    Make Your First API Request

    Use your API key to make a simple request to verify your setup.

    curl -X GET "https://api.litmusly.com/v1/tests" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json"
  3. 3

    Create Your First Test

    Create a test by sending a POST request with your test configuration.

    curl -X POST "https://api.litmusly.com/v1/tests" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name": "My First Test", "url": "https://example.com", "personas": ["power_user", "novice"]}'

API Reference

Tests API
Create and manage user testing sessions

GET
List All Tests

Retrieve a list of all tests in your account, with optional filtering.

GET /v1/tests

POST
Create a Test

Create a new test with specified parameters and personas.

POST /v1/tests

GET
Get a Test

Retrieve details for a specific test by ID.

GET /v1/tests/:id

SDKs & Libraries

JavaScript SDK
Official JavaScript SDK for browser and Node.js

Our JavaScript SDK makes it easy to integrate Litmusly into your web applications and Node.js services.

npm install @litmusly/sdk
Browser
Node.js
TypeScript
Python SDK
Official Python SDK for backend integration

Our Python SDK allows you to integrate Litmusly into your Python applications and services.

pip install litmusly
Python 3.7+
Async Support
Type Hints

Webhooks

Real-time Event Notifications
Receive notifications when events occur in your Litmusly account

Webhooks allow your application to receive real-time notifications when events occur in your Litmusly account. Instead of polling the API, your application can be notified immediately when a test is completed, feedback is generated, or other events occur.

Available Events

test.created
test.completed
feedback.created
report.generated

Example Webhook Payload

{ "event": "feedback.created", "data": { "id": "fb_123456789", "test_id": "test_987654321", "persona": "power_user", "content": "The navigation was intuitive, but I found the checkout process confusing.", "sentiment": "mixed", "created_at": "2023-05-15T14:32:21Z" } }

Need Help with the API?

Our developer support team is ready to help you integrate Litmusly into your applications.