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:
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:
Segmentation: Feedback is broken into individual segments
Classification: Each segment is classified by intent, priority, sentiment, etc.
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:
{
"source_id": "123e4567-e89b-12d3-a456-426614174000",
"source_identifier": "review-12345",
"raw_content": "The app crashes when I try to upload photos. Very frustrating!",
"submitted_at": "2024-01-15T10:30:00Z"
}
{
"source_id": "123e4567-e89b-12d3-a456-426614174000",
"source_identifier": "review-12346",
"raw_content": "Love the new dashboard design! Much easier to navigate.",
"submitted_at": "2024-01-15T11:00:00Z",
"related_metadata": {
"customer_id": "user-789",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_segment": "Enterprise",
"customer_value": 5000.00,
"platform": "Web",
"app_version": "2.1.0",
"score": 5
}
}