Skip to main content
PUT
/
api
/
v1
/
automation
/
settings
Update Automation Settings
curl --request PUT \
  --url https://api.mor.org/api/v1/automation/settings \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "is_enabled": true,
  "session_duration": 123
}'
{
  "is_enabled": true,
  "session_duration": 123,
  "user_id": 123,
  "created_at": "<string>",
  "updated_at": "<string>"
}
Update automation settings for the authenticated user. Configure whether the gateway should automatically create sessions when making chat completion requests and set the default session duration for auto-created sessions.

Headers

Authorization
string
required
Bearer token (JWT) from OAuth2 login

Body

is_enabled
boolean
default:true
Whether to enable automatic session creation
session_duration
integer
default:3600
Default session duration in seconds for auto-created sessions

Response

is_enabled
boolean
Updated automation enabled status
session_duration
integer
Updated default session duration
user_id
integer
Your user ID
created_at
string
ISO 8601 timestamp when settings were first created
updated_at
string
ISO 8601 timestamp when settings were last updated
Automatic Session Creation: When enabled (is_enabled: true), the gateway will automatically create sessions when you make chat completion requests without an active session. This eliminates the need to manually create sessions before each chat request.
Cost Implications: Automatic session creation will incur blockchain transaction costs and session fees. Set appropriate session durations to balance convenience with cost efficiency.
Session Duration Recommendations:
  • Short sessions (1-2 hours): For occasional use or testing
  • Medium sessions (4-8 hours): For regular daily use
  • Long sessions (12-24 hours): For continuous or production workloads
Partial Updates: You can update just is_enabled or just session_duration without providing both fields. Omitted fields will retain their current values.
How It Works: When you make a chat completion request:
  1. Gateway checks if you have an active session
  2. If no session exists and automation is enabled, creates a new session with the configured duration
  3. Uses the session to fulfill your chat request
  4. Returns the chat completion response