Submit Feedback via REST API

Submit customer feedback directly to Lexsis AI using our REST API. This endpoint allows you to programmatically send feedback from any source, with full control over metadata and processing.

Overview

The feedback submission API endpoint allows you to:

  • Submit individual feedback items programmatically

  • Include rich metadata for better classification

  • Trigger automatic processing pipeline

  • Integrate Lexsis AI into your existing workflows

Endpoint

POST https://api.trylexsis.com/v1/submissions

Authentication

Requires an API key with write permission. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Request Format

Headers

Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

Request Body Schema

Required Fields

Field
Type
Description

source_id

UUID

The UUID of the source integration where this feedback originates

source_identifier

string

Unique identifier from your system (e.g., review ID, ticket ID). Must be unique per source

raw_content

string

The raw feedback text content (minimum 1 character)

submitted_at

ISO datetime

Timestamp when the feedback was submitted in the source system (ISO 8601 format)

The related_metadata object accepts any fields from the standard metadata schema. All fields are optional:

Customer/User Information

  • customer_id (string): Unique identifier for the customer/user

  • customer_name (string): Customer/user name

  • customer_email (string): Customer email address

  • customer_segment (string): Customer segment - one of: Enterprise, SMB, Free, Trial

  • customer_value (float): Monetary value of customer (MRR, LTV, etc.) - used for priority calculation

Business/Organization Information

  • business_name (string): Business/organization name

  • business_id (string): Unique identifier for business/organization

Platform/Product Information

  • platform (string): Platform where feedback was submitted - one of: iOS, Android, Web, Desktop, Mobile, Tablet

  • app_version (string): Application version (e.g., 4.94.0)

  • product_version (string): Product version

  • review_created_version (string): App version when review was created

Customer Journey Information

  • account_age_days (integer): Number of days since account creation (used for journey stage inference)

  • usage_frequency (string): Frequency of product usage - one of: Daily, Weekly, Monthly, Rarely, Never

  • subscription_status (string): Subscription status - one of: Active, Trial, Expired, Cancelled

Rating/Score Information

  • score (integer): Rating score (1-5 stars)

  • thumbs_up_count (integer): Number of thumbs up/helpful votes

Location/Geography

  • location (string): Geographic location (country, region, etc.)

  • country (string): Country code (ISO 3166-1 alpha-2, e.g., us, gb)

  • language (string): Language code (ISO 639-1, e.g., en, es)

Response/Reply Information

  • reply_content (string): Response/reply content from business

  • replied_at (ISO datetime): Timestamp when reply was posted

Additional Metadata

  • user_image (string): User avatar/image URL

  • source_review_id (string): Original review ID from source system

Custom Fields

Any additional fields in related_metadata will be preserved in the source_specific dictionary for reference.

Request Examples

Minimal Example (Required Fields Only)

Example with Customer Metadata

Example with Platform and Journey Information

Example with Rating and Response

Response Format

Success Response (201 Created)

Error Responses

400 Bad Request - Invalid Source

400 Bad Request - Duplicate Source Identifier

401 Unauthorized

404 Not Found - Source Not Found

Processing Behavior

Automatic Processing

If your tenant has auto_process_submissions enabled, submissions are automatically processed through the pipeline:

  1. Segmentation: Feedback is broken into individual segments

  2. Classification: Each segment is classified by intent, priority, sentiment, etc.

  3. Bucketing: Similar segments are grouped into buckets

Processing typically completes within a few seconds to minutes, depending on submission volume.

Manual Processing

If automatic processing is disabled, submissions are stored but not processed. You can trigger processing manually via the pipeline API endpoints.

Best Practices

Unique Source Identifiers

Ensure source_identifier is unique per source. Duplicate identifiers will result in an error. Use a combination of your system's ID and timestamp if needed:

Accurate Timestamps

Use the actual timestamp when feedback was submitted, not when you're sending it to the API. This ensures accurate trend analysis:

Metadata Enrichment

Include as much metadata as possible to improve classification accuracy:

  • Customer value: Helps prioritize high-value customer feedback

  • Platform information: Enables platform-specific analysis

  • Journey stage: Improves journey stage classification

  • Ratings: Enables sentiment and satisfaction analysis

Batch Submissions

For multiple submissions, send them sequentially or use the CSV upload endpoint for bulk uploads.

Code Examples

cURL

Python

JavaScript

Next Steps

  • CSV Upload Guide - Upload feedback in bulk via CSV

  • API Overview - Explore other API endpoints

  • Getting Started Guide - Set up your account

Last updated