Documentation

Settings API

/settings
12 endpoints

Manage user settings and temporary job storage for the Storylinez application, including AI parameters, link preferences, and UI preferences.

Endpoint Base

https://api.storylinezads.com/settings

All endpoints in this section are relative to this base path. Use this prefix for all requests to the Settings API.

User Settings

Manage user-specific application settings, including AI parameters, link preferences, and UI customization options.

GET

Get Settings

/settings/get

Get Settings - GET /settings/get

Retrieves all settings for the authenticated user. If no settings exist, returns default values for all settings categories.

POST

Save Settings

/settings/save

Save Settings - POST /settings/save

Saves all settings for the authenticated user. Replaces entire settings objects with the provided values, filling in any missing fields with default values.

Parameters:

  • ai_params: AI operation parameters
  • ai_params.eco: Economy mode flag for reduced resource usage
  • ai_params.deepthink: Enhanced thinking mode for deeper analysis
  • ai_params.temperature: AI randomness parameter
  • ai_params.iterations: Number of AI processing iterations
  • ai_params.web_search: Enable web search during processing
  • ai_params.overdrive: High-performance processing mode
  • link_preferences: Link sharing preferences
  • link_preferences.generate_thumbnail: Generate thumbnail URLs when sharing
  • link_preferences.generate_streamable: Generate streamable URLs when sharing
  • link_preferences.generate_download: Generate download URLs when sharing
  • link_preferences.detail: Include detailed information when sharing
  • ui_preferences: User interface preferences
  • ui_preferences.dark_mode: Enable dark mode UI
  • ui_preferences.default_view: Default view mode for content displays
  • ui_preferences.language: Interface language code
  • ui_preferences.current_org_id: ID of currently selected organization
  • ui_preferences.last_project_id: ID of last visited project
  • ui_preferences.current_tab: Current active tab in the UI
PUT

Update Settings

/settings/update

Update Settings - PUT /settings/update

Partially updates specific settings categories for the authenticated user. Only the provided fields will be modified.

Parameters:

  • ai_params: AI parameters to update
  • link_preferences: Link preferences to update
  • ui_preferences: UI preferences to update
POST

Reset Settings

/settings/reset

Reset Settings - POST /settings/reset

Resets all or specific settings categories to their default values for the authenticated user.

Parameters:

  • category: Settings category to reset
PUT

Update Theme

/settings/theme

Update Theme - PUT /settings/theme

Updates the UI theme preference (specifically the dark mode setting) for the authenticated user. This is a convenience shortcut endpoint.

Parameters:

  • dark_mode: Whether to enable dark mode UI
PUT

Update AI Defaults

/settings/ai-defaults

Update AI Defaults - PUT /settings/ai-defaults

Updates the default AI parameters for the authenticated user. This is a convenience shortcut endpoint.

Parameters:

  • eco: Economy mode flag
  • deepthink: Deep thinking mode
  • temperature: AI randomness parameter
  • iterations: Number of iterations
  • web_search: Enable web search
  • overdrive: Overdrive mode
GET

Get Email Preferences

/settings/email-preferences

Get Email Preferences - GET /settings/email-preferences

Get the authenticated user's email notification preferences.

POST

Save Email Preferences

/settings/email-preferences

Save Email Preferences - POST /settings/email-preferences

Create or update email notification preferences for the authenticated user.

Parameters:

  • marketing_emails: Enable/disable marketing emails.
  • product_updates: Enable/disable product update emails.
  • usage_alerts: Enable/disable usage and quota alerts.

Job Management

Manage temporary job entries for tracking tasks and processes in the system.

POST

Add Job

/settings/jobs/add

Add Job - POST /settings/jobs/add

Adds a new temporary job entry to the system for tracking asynchronous processes. The system maintains a limited history of jobs per organization and job type.

Parameters:

  • job_id: Unique job identifier
  • org_id: Organization ID
  • job_type: Type of job
  • project_id: Associated project ID
  • metadata: Additional job metadata
GET

List Jobs

/settings/jobs/list

List Jobs - GET /settings/jobs/list

Retrieves a paginated list of temporary job entries for the authenticated user and specified organization.

Parameters:

  • org_id: Organization ID
  • project_id: Filter by project ID
  • job_type: Filter by job type
  • page: Page number for pagination
  • limit: Results per page
  • sort_by: Field to sort by
  • sort_order: Sort direction
DELETE

Delete Job

/settings/jobs/delete

Delete Job - DELETE /settings/jobs/delete

Deletes a temporary job entry identified by job_id and organization.

Parameters:

  • job_id: Job identifier
  • org_id: Organization ID
GET

Fetch Job Results

/settings/jobs/fetch_results

Fetch Job Results - GET /settings/jobs/fetch_results

Fetches the results of a job from the build server. This endpoint first checks if the job exists in the database, then contacts the build server to retrieve the actual results.

Parameters:

  • job_id: Job identifier
  • org_id: Organization ID