Overview
The Customer Portal allows you to create custom, customer-facing dashboards that demonstrate the tangible value your AI agent delivers. In the AI agent era, proving value is critical for sales conversion, renewals, and upsells—but it’s harder than traditional SaaS because AI outcomes are probabilistic, ROI is difficult to isolate, and trust matters more than ever. Base URL:https://api.adenhq.com/v1/portal
Why Customer Portals Matter for AI Agents
Unlike traditional SaaS which sells deterministic features, AI agents sell probabilistic outcomes. This creates unique challenges in proving value:The Challenge
- Value is Probabilistic: Agents deliver “improved outcomes” rather than guaranteed features, making ROI harder to predict upfront
- Attribution is Complex: Agent impact blends with human performance, data quality, and process maturity
- Trust and Control: Buyers need reassurance about hallucinations, brand risk, and autonomy concerns that didn’t exist in classic SaaS
The Solution
Customer Portals provide a low-implementation way to produce “proof of value” by:- Demonstrating what the agent did with usage metrics and activity logs
- Quantifying impact through savings, revenue generated, and efficiency gains
- Building trust with transparent, customer-specific metrics
- Supporting renewals & upsells with ongoing value narration
Core Capabilities
1. Custom Dashboard Configuration
Select metrics from your metrics store, segment by customer, and create branded dashboards that can be embedded directly into your product.2. Automated Value Reports
Schedule regular reports (daily, weekly, monthly) delivered via email or webhooks to keep customers informed of their agent’s performance.3. Customer-Specific Metrics
All metrics are automatically segmented bycustomer_id, ensuring each customer only sees their own data with proper isolation and security.
4. Embeddable & Secure
Dashboards can be embedded in your application with whitelisting and authentication, or accessed via unique customer links.Authentication
All API requests require authentication via API key in the header:Data Models
Portal Configuration
Value Report Configuration
Portal Access Token
API Endpoints
1. Create Portal Configuration
Create a new customer portal.201 Created
2. Get Portal Configuration
Retrieve a portal configuration.200 OK
3. Update Portal Configuration
Update an existing portal.200 OK
4. List Portal Configurations
List all portals, optionally filtered by customer.| Parameter | Type | Default | Description |
|---|---|---|---|
customer_id | string | all | Filter by specific customer |
status | string | all | Filter by status: draft, active, archived |
limit | integer | 50 | Results per page |
cursor | string | - | Pagination cursor |
200 OK
5. Generate Portal Access Token
Generate a JWT token for accessing a customer portal.201 Created
6. Get Portal Data
Retrieve the actual metric data for a portal (used by embedded dashboards).| Parameter | Type | Default | Description |
|---|---|---|---|
start | string | 30d ago | Start time (ISO 8601) |
end | string | now | End time (ISO 8601) |
metric_ids | string | all | Comma-separated list of specific metrics |
200 OK
7. Create Value Report
Configure an automated value report.201 Created
8. Send Report Now
Trigger an immediate report delivery (for testing or ad-hoc sends).202 Accepted
9. List Reports
Get all configured reports for a portal.| Parameter | Type | Default | Description |
|---|---|---|---|
portal_id | string | - | Filter by portal |
is_active | boolean | all | Filter by active status |
200 OK
10. Update Report Configuration
Modify report settings.11. Delete Report
Remove a scheduled report.200 OK
12. Configure Webhook for Portal Events
Set up webhooks to receive notifications about portal activity.201 Created
Webhook Payload Example:
SDK Examples
Python SDK
TypeScript SDK
Minimal Integration Example
For quick setup with minimal code (< 20 lines):Before/After Comparisons (Optional)
For showing the impact of your agent versus the baseline, you can configure comparison metrics:Security & Data Isolation
Customer Data Isolation
All metrics are automatically filtered bycustomer_id. When a portal is accessed:
- The system validates the customer_id associated with the portal
- All metric queries are automatically scoped to that customer
- No cross-customer data is ever exposed
Embedding Security
When embedding portals:- Domain Whitelisting: Only allowed domains can embed the portal
- Token-Based Access: Short-lived JWT tokens authenticate each session
- CORS Protection: Proper CORS headers prevent unauthorized access
- Content Security Policy: CSP headers prevent XSS attacks
Access Control
Tokens can have granular permissions:read:metrics- View metric dataexport:data- Download raw data as CSVconfigure:portal- Modify portal settings (admin only)
Error Responses
Error Codes
| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | INVALID_METRIC_ID | One or more metric IDs are invalid |
| 400 | INVALID_LAYOUT | Layout configuration is malformed |
| 401 | UNAUTHORIZED | Invalid or expired API key |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | PORTAL_NOT_FOUND | Portal does not exist |
| 404 | CUSTOMER_NOT_FOUND | Customer ID not found |
| 409 | PORTAL_ALREADY_EXISTS | Portal for this customer already exists |
| 429 | RATE_LIMITED | Too many requests |
Rate Limits
| Endpoint Category | Requests per Minute |
|---|---|
| Portal Config (GET) | 300 |
| Portal Data (GET) | 600 |
| Portal Config (POST/PATCH) | 60 |
| Token Generation | 120 |
| Report Operations | 30 |