Automation Hub
API for Automation Hub configuration and shareable link management
The Automation Hub API provides endpoints for managing hub settings, analytics, and shareable link authentication for public marketplace access.
Overview
The Automation Hub API includes three main areas:
Settings: Configure hub appearance, behavior, and access controls (admin only)
Analytics: Track template usage and performance metrics (see Analytics API)
Shareable Links: Enable public access via email-based authentication with OTP tokens
Hub Settings
Get Settings
GET http://[API-URL]/automation-hub/settings
Retrieve the current Automation Hub settings. All authenticated users can read settings, but sensitive fields (like email allow lists) are filtered for non-admin users.
curl -XGET "http://[API-URL]/automation-hub/settings" \
-H "Authorization: Bearer [ACCESS_TOKEN]"{
"id": "default",
"settings": {
"sharing": {
"allowedEmails": [ // Only visible to admin users
"user@example.com",
"team@company.com"
]
},
"theme": {
"primaryColor": "#007bff",
"logoUrl": "https://example.com/logo.png"
},
"customField": "any-value" // Settings support flexible schema
},
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-04-20T14:45:00.000Z"
}{
"id": "default",
"settings": {},
"createdAt": null,
"updatedAt": null
}Field Filtering:
Admin users: See all settings including
sharing.allowedEmailsRegular users: Sensitive fields are automatically filtered from the response
Update Settings
POST http://[API-URL]/automation-hub/settings
Create or update Automation Hub settings. This endpoint performs an upsert operation. Admin token required.
Request Body
settings*
object
Settings object with flexible schema
settings.sharing.allowedEmails
array
Email addresses allowed to access Hub via share link
Delete Settings
DELETE http://[API-URL]/automation-hub/settings
Delete all Automation Hub settings and reset to defaults. Admin token required.
Settings successfully deleted.
Shareable Links
Shareable links allow you to provide public access to your Automation Hub marketplace using email-based authentication with one-time passwords (OTP). Users receive activation links via email to authenticate without traditional login credentials.
Architecture
Email Allow List: Admin configures allowed emails in hub settings
Request Login: User requests access with their email
Activation Link: System sends time-limited activation code
Token Generation: User activates link to receive JWT token with OTP flag
Virtual User: System creates virtual user account automatically
Request Login
POST http://[API-URL]/automation-hub/share/request-login
Request an activation link for email-based login. No authentication required. Rate limited by email and IP address.
Request Body
email*
string
Email address (max 255 characters)
Email will be sent automatically with the activation link.
When AUTOMATION_HUB_AUTO_SEND_EMAIL is disabled, the link is returned directly.
The email is not on the allow list configured in hub settings.
Rate limit exceeded. Separate limits apply per email and per IP address.
Email sending failed (SMTP or Cloud Email API error).
Rate Limits:
Per email: Configurable via
AUTOMATION_HUB_RATE_LIMIT_REQUEST_LOGIN_EMAIL(default: 5 requests per minute)Per IP: Configurable via
AUTOMATION_HUB_RATE_LIMIT_REQUEST_LOGIN_IP(default: 20 requests per minute)
Email Delivery: The system automatically selects the email service:
If
SMTP_HOSTis configured, uses SMTPOtherwise, uses Cloud Email API (requires
APPMIXER_CLOUD_EMAIL_APIandAPPMIXER_CLOUD_EMAIL_API_KEY)
Activate Link
GET http://[API-URL]/automation-hub/share/activate?code=[CODE]
Activate the link, create or find virtual user, and return JWT token. No authentication required. Rate limited by IP address.
Query Parameters
code*
string
Activation code from email link
The JWT token includes an otp: true flag and can be used for authentication.
Each activation link can only be used once.
The activation code is invalid or the link has expired.
Rate limit exceeded for IP address.
Rate Limits:
Per IP: Configurable via
AUTOMATION_HUB_RATE_LIMIT_ACTIVATE_IP(default: 10 requests per minute)
Virtual Users:
Automatically created on first activation
Username and email set to the activation email address
Flagged as virtual users in the system
Can access only the Automation Hub marketplace
Refresh Link
POST http://[API-URL]/automation-hub/share/refresh
Request a new activation link for users with expired tokens. Works exactly like /request-login but intended for users who already have an expired session. No authentication required. Rate limited by email and IP address.
Request Body
email*
string
Email address (max 255 characters)
Rate Limits:
Per email: Configurable via
AUTOMATION_HUB_RATE_LIMIT_REFRESH_EMAIL(default: 5 requests per minute)Per IP: Configurable via
AUTOMATION_HUB_RATE_LIMIT_REFRESH_IP(default: 20 requests per minute)
Configuration
Environment Variables
Email Configuration
SMTP (Option 1):
Cloud Email API (Option 2):
The system automatically uses SMTP if SMTP_HOST is set, otherwise falls back to Cloud Email API.
Activation Link Settings
Rate Limiting
Use Cases
Public Marketplace Access
Enable public users to access your Automation Hub marketplace:
Custom Hub Theming
Configure custom theme and branding:
Programmatic Allow List Management
Dynamically manage email access:
Security
Email Allow List
The email allow list provides the primary access control mechanism:
Only emails on the list can request activation links
Case-insensitive matching
Constant-time response prevents email enumeration attacks
Administrators manage the list via settings API
Rate Limiting
Multiple rate limits protect against abuse:
Per Email: Prevents spam to specific addresses
Per IP: Prevents brute-force attacks from single source
Separate Limits: Different limits for request, activate, and refresh operations
Activation Link Security
Activation links include several security features:
Time-Limited: Configurable TTL (default: 1 hour)
Single-Use: Each code can only be activated once
Atomic Marking: Race condition protection prevents double-use
Random Codes: Cryptographically secure token generation
Virtual Users
Virtual users have restricted capabilities:
Created automatically on activation
Limited to Automation Hub marketplace access
Separated from regular user accounts
JWT tokens include
otp: trueflag for identification
Audit Logging
All hub settings operations are automatically logged:
Settings Update:
Settings Delete:
Each audit log entry includes:
Operation type (upsert/delete)
Before and after state
Timestamp and admin user who performed the action
Full settings object (including sensitive fields)
See Audit Logs for more information.
Error Handling
Common Errors
Email Not Authorized (403)
Solution: Add email to allow list via settings API
Rate Limit Exceeded (429)
Solution: Wait 60 seconds before retrying
Invalid Activation Code (404)
Solution: Request new activation link via /request-login or /refresh
Link Already Used (400)
Solution: Request new activation link - each code can only be used once
Email Sending Failures
If email sending fails:
Check SMTP configuration (host, port, credentials)
Verify Cloud Email API configuration (URL, API key)
Review server logs for detailed error messages
Ensure firewall allows outbound email connections
Was this helpful?
