### Minimal working example Source: https://userjot.com/docs/widget-installation A complete setup combining the SDK loader and the initialization script. ```html ``` -------------------------------- ### Initialize UserJot SDK Source: https://userjot.com/docs/sdk-swift-installation Call the setup method with your project ID during application startup. ```swift import UserJot UserJot.setup(projectId: "YOUR_PROJECT_ID") ``` -------------------------------- ### UserJot MCP Configuration Values Source: https://userjot.com/docs/mcp-chatgpt Use these credentials when prompted by the ChatGPT MCP setup interface. ```text Endpoint: https://api.userjot.com/v1/mcp Authorization: Bearer YOUR_USERJOT_API_TOKEN ``` -------------------------------- ### GET /boards Source: https://userjot.com/docs/api Retrieves a list of all boards available in the system. ```APIDOC ## GET /boards ### Description List all boards available to the authenticated user. ### Method GET ### Endpoint https://api.userjot.com/v1/boards ``` -------------------------------- ### HTML and text link examples Source: https://userjot.com/docs/deep-link-feedback Examples of embedding deep links in email CTAs and support communications. ```html Share feedback ``` ```text Thanks for the suggestion. Please send it here so we can track it properly: https://feedback.yourcompany.com/?openFeedback ``` -------------------------------- ### Runtime Configuration Updates Source: https://userjot.com/docs/widget-configuration Methods to modify widget behavior after the initial setup. ```javascript window.uj.setWidgetPosition('left'); ``` ```javascript window.uj.setTheme('dark'); ``` ```javascript window.uj.setWidgetEnabled(false); window.uj.setWidgetEnabled(true); ``` -------------------------------- ### SSO Redirect URL Example Source: https://userjot.com/docs/single-sign-on The URL structure for the SSO redirect endpoint, which must include the state parameter provided by UserJot. ```text https://yourapp.com/userjot/sso?state=OPAQUE_STATE_FROM_USERJOT ``` -------------------------------- ### Get Widget State Source: https://userjot.com/docs/widget-sdk-reference Retrieves the current visibility and section state of the widget. ```javascript const state = window.uj.getWidgetState(); // { isOpen: boolean, section: 'feedback' | 'roadmap' | 'updates' | null } ``` -------------------------------- ### GET /userjot/sso Source: https://userjot.com/docs/single-sign-on An endpoint to initiate the SSO flow by generating a signed JWT and redirecting the user to the UserJot callback URL. ```APIDOC ## GET /userjot/sso ### Description This endpoint authenticates the current user and redirects them to the UserJot SSO callback URL with a signed JWT containing user identity and optional company membership data. ### Method GET ### Endpoint /userjot/sso ### Parameters #### Query Parameters - **state** (string) - Required - A state parameter used to maintain session integrity during the redirect flow. ### Response #### Success Response (302) - Redirects to the UserJot callback URL with 'jwt' and 'state' query parameters. ``` -------------------------------- ### GET /boards Source: https://userjot.com/docs/api Lists all boards for the organization resolved from the bearer token. This collection is not paginated in v1. ```APIDOC ## GET /boards ### Description Lists boards for the organization resolved from the bearer token. Returns all boards; this collection is not paginated in v1. ### Method GET ### Endpoint https://api.userjot.com/v1/boards ### Response #### Success Response (200) - **boards** (array) - List of board objects. #### Response Example { "boards": [ { "id": "brd_001", "name": "Ideas", "slug": "ideas", "color": "indigo", "type": "public", "order": 1 } ] } ``` -------------------------------- ### JWT Payload Construction Source: https://userjot.com/docs/single-sign-on Example of creating a JWT payload for UserJot authentication using the HS256 algorithm and required claims. ```javascript const now = Math.floor(Date.now() / 1000); const payload = { sub: 'user_123', email: 'jane@example.com', firstName: 'Jane', lastName: 'Doe', iss: 'YOUR_PROJECT_ID', aud: 'userjot', iat: now, exp: now + 10 * 60 }; ``` -------------------------------- ### GET /?openFeedback Source: https://userjot.com/docs/deep-link-feedback Append the openFeedback query parameter to your public feedback URL to automatically trigger the submission modal upon page load. ```APIDOC ## GET /?openFeedback ### Description Triggers the feedback submission modal automatically when the page loads. The system removes the query parameter after execution to prevent reopening on subsequent navigation. ### Query Parameters - **openFeedback** (string/boolean) - Optional - Accepted values: "true", "1", "yes", "on", or empty. Triggers the modal. ### Example https://yourproject.userjot.com/?openFeedback ``` -------------------------------- ### window.uj.init(projectId, options) Source: https://userjot.com/docs/widget-configuration Initializes the UserJot SDK with the specified project ID and configuration options. ```APIDOC ## window.uj.init(projectId, options) ### Description Initializes the UserJot widget. This should be called to set up the default position, theme, trigger behavior, and locale. ### Parameters - **projectId** (string) - Required - Your unique project identifier. - **options** (object) - Optional - Configuration object: - **widget** (boolean) - Enable the floating widget. - **position** ('left' | 'right') - Screen position of the launcher. - **theme** ('auto' | 'light' | 'dark') - Widget color mode. - **trigger** ('default' | 'custom') - Whether to show the default launcher or wait for custom UI interaction. - **locale** (string) - Language code (e.g., 'fr-FR', 'en-US') or 'auto'. - **onReady** (function) - Callback executed when SDK is initialized. - **onError** (function) - Callback executed on initialization failure. ``` -------------------------------- ### Initialize SDK and Embed Source: https://userjot.com/docs/iframe-embed Load the SDK and call the embed function within the onReady callback to ensure the environment is prepared. ```javascript ``` -------------------------------- ### Initialize UserJot SDK Source: https://userjot.com/docs/automatic-login Load and initialize the UserJot SDK in your application. ```html ``` -------------------------------- ### Add the SDK loader Source: https://userjot.com/docs/widget-installation Place this script near the end of your page, just before the closing tag to set up the API and fetch the SDK. ```html ``` -------------------------------- ### Show Roadmap and Changelog Source: https://userjot.com/docs/sdk-swift-common-flows Opens the roadmap or changelog interfaces. ```swift UserJot.showRoadmap() ``` ```swift UserJot.showChangelog() ``` -------------------------------- ### Initialize SDK in UIKit Source: https://userjot.com/docs/sdk-swift-installation Perform SDK initialization within the application delegate's launch method. ```swift import UIKit import UserJot @main class AppDelegate: UIResponder, UIApplicationDelegate { func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil ) -> Bool { UserJot.setup(projectId: "YOUR_PROJECT_ID") return true } } ``` -------------------------------- ### Initialize the widget Source: https://userjot.com/docs/widget-installation Execute this script after the loader to initialize the widget with your specific project ID. ```html ``` -------------------------------- ### Embed the UserJot experience Source: https://userjot.com/docs/widget-sdk-reference Initializes the widget within a specified container and returns a controller for further interaction. ```javascript const embed = window.uj.embed({ container: '#feedback-embed', path: '/roadmap', theme: 'auto', basePath: '/feedback', navbar: 'hidden', onReady: () => {}, onError: (error) => {} }); ``` -------------------------------- ### Verify SDK Import Source: https://userjot.com/docs/sdk-swift-installation Confirm the package is correctly linked by importing the module in a source file. ```swift import UserJot ``` -------------------------------- ### UserJot.showRoadmap() Source: https://userjot.com/docs/sdk-swift-common-flows Opens the roadmap interface. ```APIDOC ## UserJot.showRoadmap() ### Description Opens the roadmap interface to display product progress. ``` -------------------------------- ### Show Widget Source: https://userjot.com/docs/widget-sdk-reference Opens the widget, optionally specifying a default section. ```javascript window.uj.showWidget(); window.uj.showWidget({ section: 'feedback' }); window.uj.showWidget({ section: 'roadmap' }); window.uj.showWidget({ section: 'updates' }); ``` -------------------------------- ### Initialize SDK in SwiftUI Source: https://userjot.com/docs/sdk-swift-installation Perform SDK initialization within the App struct's initializer. ```swift import SwiftUI import UserJot @main struct MyApp: App { init() { UserJot.setup(projectId: "YOUR_PROJECT_ID") } var body: some Scene { WindowGroup { ContentView() } } } ``` -------------------------------- ### Initialize UserJot Widget Source: https://userjot.com/docs/widget-configuration The primary method for configuring the widget's initial state, including position, theme, and lifecycle hooks. ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, position: 'right', theme: 'auto', trigger: 'default', locale: 'auto', onReady: () => {}, onError: (error) => {} }); ``` -------------------------------- ### Configure UserJot MCP Server Source: https://userjot.com/docs/mcp-cursor Add this JSON configuration to your ~/.cursor/mcp.json or .cursor/mcp.json file to register the UserJot server. ```json { "mcpServers": { "userjot": { "url": "https://api.userjot.com/v1/mcp", "headers": { "Authorization": "Bearer ${env:USERJOT_API_TOKEN}" } } } } ``` -------------------------------- ### showWidget(options?) Source: https://userjot.com/docs/widget-sdk-reference Opens the widget. Optionally accepts a section parameter to open directly to a specific view. ```APIDOC ## showWidget(options?) ### Description Opens the widget. Optionally accepts a section parameter to open directly to a specific view. ### Parameters - **options.section** (string) - Optional - 'feedback', 'roadmap', or 'updates' ### Example ```javascript window.uj.showWidget(); window.uj.showWidget({ section: 'feedback' }); ``` ``` -------------------------------- ### Lifecycle Callbacks Source: https://userjot.com/docs/widget-configuration Hooks for handling SDK initialization status and errors. ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, onReady: () => { console.log('UserJot is ready'); } }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, onError: (error) => { console.error('UserJot failed to initialize:', error.message); } }); ``` -------------------------------- ### window.uj.embed(options) Source: https://userjot.com/docs/iframe-embed Initializes and renders the UserJot feedback portal within a specified container. Returns a controller object for programmatic interaction. ```APIDOC ## window.uj.embed(options) ### Description Creates an iframe embed of the UserJot portal. This method should be called after the SDK has been initialized, preferably within the `onReady` callback. ### Parameters - **options** (object) - Optional - Configuration object for the embed. - **container** (string|HTMLElement) - Optional - CSS selector or element where the iframe will be injected. Defaults to `[data-userjot-embed]`. - **path** (string) - Optional - Initial path to load within the embed. Defaults to `/`. - **theme** (string) - Optional - Visual theme: `'auto'`, `'light'`, or `'dark'`. - **basePath** (string) - Optional - Enables URL syncing between the parent page and the embedded navigation. - **navbar** (string) - Optional - Set to `'hidden'` to hide the embedded top navigation. - **onReady** (function) - Optional - Callback triggered when the iframe is ready. - **onError** (function) - Optional - Callback triggered if the embed fails to load. ### Returns - **controller** (object) - An object providing methods to `navigate(path)` or `destroy()` the specific embed instance. ``` -------------------------------- ### Redirect Source: https://userjot.com/docs/widget-sdk-reference Navigates the user to the public UserJot site with optional parameters. ```javascript window.uj.redirect(); window.uj.redirect({ to: 'roadmap' }); window.uj.redirect({ to: 'feedback', openFeedback: true }); window.uj.redirect({ to: 'updates', newTab: true }); ``` -------------------------------- ### Runtime Configuration Methods Source: https://userjot.com/docs/widget-configuration Methods to update widget behavior after the initial configuration. ```APIDOC ## Runtime Configuration Methods ### Description Methods to modify widget settings dynamically after initialization. ### Methods - **window.uj.setWidgetPosition(position)** - Updates the widget position ('left' or 'right'). - **window.uj.setTheme(theme)** - Updates the theme ('light', 'dark', or 'auto'). - **window.uj.setWidgetEnabled(enabled)** - Boolean to enable or disable the widget visibility. ``` -------------------------------- ### Show Feedback Experience Source: https://userjot.com/docs/sdk-swift-common-flows Opens the default feedback interface or directs it to a specific board. ```swift UserJot.showFeedback() ``` ```swift UserJot.showFeedback(board: "feature-requests") ``` -------------------------------- ### POST /boards Source: https://userjot.com/docs/api Creates a new board with a unique name and specified color. The slug is generated automatically. ```APIDOC ## POST /boards ### Description Creates a board, generates its slug automatically, requires the board name to be unique within the organization, defaults the board type to public. ### Method POST ### Endpoint https://api.userjot.com/v1/boards ### Request Body - **name** (string) - Required - Board name (1-255 characters). - **color** (string) - Required - Public board color value (gray, gold, bronze, brown, yellow). ### Request Example { "name": "Bugs", "color": "gray" } ### Response #### Success Response (201) - **board** (object) - The created board object. #### Response Example { "board": { "id": "brd_003", "name": "Bugs", "slug": "bugs", "color": "gray", "type": "public", "order": 3 } } ``` -------------------------------- ### Common Configuration Patterns Source: https://userjot.com/docs/widget-configuration Standard boilerplate configurations for common use cases. ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, theme: 'auto' }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, trigger: 'custom' }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, locale: 'en-US' }); ``` -------------------------------- ### UserJot.showChangelog() Source: https://userjot.com/docs/sdk-swift-common-flows Opens the changelog interface. ```APIDOC ## UserJot.showChangelog() ### Description Opens the changelog interface to display product updates. ``` -------------------------------- ### askForFeedback(options?) Source: https://userjot.com/docs/widget-sdk-reference Shows a toast prompt that sends the user into the feedback flow. ```APIDOC ## askForFeedback(options?) ### Description Shows a toast prompt that sends the user into the feedback flow when they click the action. ### Parameters - **options.title** (string) - Optional - toast title - **options.description** (string) - Optional - toast description - **options.duration** (number) - Optional - duration in milliseconds ### Example ```javascript window.uj.askForFeedback({ title: 'Have feedback?', duration: 15000 }); ``` ``` -------------------------------- ### Configure generic remote MCP server Source: https://userjot.com/docs/mcp-common-setup Standard JSON configuration structure for integrating UserJot into remote MCP-supported clients. ```json { "mcpServers": { "userjot": { "url": "https://api.userjot.com/v1/mcp", "headers": { "Authorization": "Bearer YOUR_USERJOT_API_TOKEN" } } } } ``` -------------------------------- ### Add UserJot to Package.swift Source: https://userjot.com/docs/sdk-swift-installation Include this dependency definition in your Package.swift file to manage the SDK version. ```swift dependencies: [ .package(url: "https://github.com/UserJot/userjot-ios", from: "0.3.0") ] ``` -------------------------------- ### Programmatic redirects via SDK Source: https://userjot.com/docs/deep-link-feedback Use the window.uj.redirect method to handle navigation when the widget SDK is already loaded. ```javascript window.uj.redirect(); window.uj.redirect({ openFeedback: true }); window.uj.redirect({ openFeedback: true, newTab: true }); window.uj.redirect({ to: 'updates' }); ``` -------------------------------- ### Add UserJot via Swift Package Manager URL Source: https://userjot.com/docs/sdk-swift-installation Use this URL when adding the package dependency through the Xcode interface. ```text https://github.com/UserJot/userjot-ios ``` -------------------------------- ### UserJot.showFeedback() Source: https://userjot.com/docs/sdk-swift-common-flows Opens the default feedback experience. Optionally accepts a board identifier to route feedback to a specific board. ```APIDOC ## UserJot.showFeedback(board: String?) ### Description Opens the feedback interface. If a board identifier is provided, the feedback is directed to that specific board. ### Parameters - **board** (String) - Optional - The identifier of the board to direct feedback into. ``` -------------------------------- ### Create Board Request Source: https://userjot.com/docs/api Creates a new board with a specified name and color. The board name must be unique within the organization. ```shell curl https://api.userjot.com/v1/boards \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --data '{ "name": "Bugs", "color": "gray" }' ``` -------------------------------- ### Locate Windsurf MCP Configuration File Source: https://userjot.com/docs/mcp-windsurf The path to the configuration file where MCP server definitions are stored. ```text ~/.codeium/windsurf/mcp_config.json ``` -------------------------------- ### Define UserJot MCP Server Configuration Source: https://userjot.com/docs/mcp-windsurf Add this JSON structure to the mcp_config.json file to register the UserJot server. Ensure the USERJOT_API_TOKEN environment variable is set for authentication. ```json { "mcpServers": { "userjot": { "serverUrl": "https://api.userjot.com/v1/mcp", "headers": { "Authorization": "Bearer ${env:USERJOT_API_TOKEN}" } } } } ``` -------------------------------- ### embed(options?) Source: https://userjot.com/docs/widget-sdk-reference Embeds the public UserJot experience in an iframe and returns a controller. ```APIDOC ## embed(options?) ### Description Embeds the public UserJot experience in an iframe and returns an EmbedController or null. ### Parameters - **options.container** (CSS selector or HTMLElement) - Required - The container element for the iframe. - **options.path** (string) - Optional - Initial path inside the public UserJot site. - **options.theme** ('auto', 'light', 'dark') - Optional - The visual theme of the embed. - **options.basePath** (string) - Optional - Parent-site path prefix for URL syncing. - **options.navbar** ('hidden') - Optional - Set to 'hidden' to hide the embedded top navigation. - **options.onReady** (function) - Optional - Callback triggered when the embed is ready. - **options.onError** (function) - Optional - Callback triggered if creation fails. ### Return Value Returns an `EmbedController` instance or `null`. ``` -------------------------------- ### Enable URL Syncing Source: https://userjot.com/docs/iframe-embed Configure the basePath to synchronize the parent page URL with the internal navigation of the embed. ```javascript window.uj.embed({ basePath: '/feedback' }); ``` -------------------------------- ### Verify Integration Source: https://userjot.com/docs/sdk-swift-installation Trigger a UI component to confirm the SDK is functional. ```swift UserJot.showFeedback() ``` -------------------------------- ### window.uj.redirect() Source: https://userjot.com/docs/deep-link-feedback Programmatically redirect users to UserJot pages using the SDK, which automatically resolves the canonical domain and handles session state. ```APIDOC ## window.uj.redirect(options) ### Description Redirects the user to a specific UserJot page or state using the SDK. ### Parameters - **options** (object) - Optional - Configuration object for the redirect. - **openFeedback** (boolean) - Optional - If true, opens the feedback modal. - **newTab** (boolean) - Optional - If true, opens the link in a new tab. - **to** (string) - Optional - Specifies a destination page (e.g., 'updates'). ### Example window.uj.redirect({ openFeedback: true, newTab: true }); ``` -------------------------------- ### Link to UserJot Surfaces Source: https://userjot.com/docs/automatic-login Standard links to UserJot surfaces that will automatically carry the session token. ```html Give feedback Roadmap Updates ``` -------------------------------- ### setTheme(theme) Source: https://userjot.com/docs/widget-sdk-reference Changes the widget theme after initialization. ```APIDOC ## setTheme(theme) ### Description Changes the widget theme after initialization. ### Parameters - **theme** (string) - Required - 'dark', 'light', or 'auto' ### Example ```javascript window.uj.setTheme('dark'); ``` ``` -------------------------------- ### Configure Embed Options Source: https://userjot.com/docs/iframe-embed Customize the embed behavior using various configuration parameters like theme, path, and event callbacks. ```javascript const embed = window.uj.embed({ container: '#feedback-embed', path: '/roadmap', theme: 'light', basePath: '/feedback', navbar: 'hidden', onReady: () => { console.log('Embed ready'); }, onError: (error) => { console.error('Embed failed:', error.message); } }); ``` -------------------------------- ### Ask For Feedback Source: https://userjot.com/docs/widget-sdk-reference Displays a toast prompt to trigger the feedback flow. ```javascript window.uj.askForFeedback(); window.uj.askForFeedback({ title: 'Have feedback?', description: 'Tell us what would make this workflow better.', duration: 15000 }); ``` -------------------------------- ### Tracking campaign sources Source: https://userjot.com/docs/deep-link-feedback Combine deep link parameters with standard UTM tracking parameters. ```text https://feedback.yourcompany.com/?openFeedback&utm_source=email&utm_campaign=q2-launch ``` -------------------------------- ### Create Board Response Schema Source: https://userjot.com/docs/api The JSON structure returned upon successfully creating a new board. ```json { "board": { "id": "brd_003", "name": "Bugs", "slug": "bugs", "color": "gray", "type": "public", "order": 3 } } ``` -------------------------------- ### Configure Widget Options Source: https://userjot.com/docs/widget-configuration Individual configuration options for the widget's appearance and behavior. ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, position: 'left' }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, theme: 'dark' }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, trigger: 'custom' }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, trigger: 'custom' }); document .querySelector('[data-feedback-button]') ?.addEventListener('click', () => { window.uj.showWidget({ section: 'feedback' }); }); ``` ```javascript window.uj.init('YOUR_PROJECT_ID', { widget: true, locale: 'fr-FR' }); ``` ```javascript const userLocale = getUserLocale(); window.uj.init('YOUR_PROJECT_ID', { widget: true, locale: userLocale }); ``` -------------------------------- ### Verify MCP server configuration Source: https://userjot.com/docs/mcp-claude-code Commands to list configured MCP servers or inspect their status within the Claude Code environment. ```bash claude mcp list ``` ```bash /mcp ``` -------------------------------- ### redirect(options?) Source: https://userjot.com/docs/widget-sdk-reference Redirects the user to your public UserJot site. ```APIDOC ## redirect(options?) ### Description Redirects the user to your public UserJot site. Resolves the correct public domain and appends the client token. ### Parameters - **options.to** (string) - Optional - 'feedback', 'roadmap', or 'updates' - **options.openFeedback** (boolean) - Optional - adds openFeedback query parameter - **options.newTab** (boolean) - Optional - opens in a new tab ### Example ```javascript window.uj.redirect({ to: 'roadmap' }); ``` ``` -------------------------------- ### UserJot MCP Server Configuration Values Source: https://userjot.com/docs/mcp-codex Use these specific values when prompted by the Codex CLI or IDE extension for remote MCP server details. ```text Name: userjot URL: https://api.userjot.com/v1/mcp Authorization: Bearer YOUR_USERJOT_API_TOKEN ``` -------------------------------- ### Set Theme Source: https://userjot.com/docs/widget-sdk-reference Updates the widget visual theme dynamically. ```javascript window.uj.setTheme('dark'); window.uj.setTheme('light'); window.uj.setTheme('auto'); ``` -------------------------------- ### Basic URL patterns for feedback Source: https://userjot.com/docs/deep-link-feedback Append the openFeedback parameter to your public feedback URL to trigger the modal on load. ```text https://yourproject.userjot.com/?openFeedback ``` ```text https://feedback.yourcompany.com/?openFeedback ``` -------------------------------- ### List Boards Request Source: https://userjot.com/docs/api Retrieves all boards associated with the organization. Requires a valid Bearer token in the Authorization header. ```shell curl https://api.userjot.com/v1/boards \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Retrieve UserJot MCP connection credentials Source: https://userjot.com/docs/mcp-common-setup Required values for configuring any MCP-compatible client to connect to UserJot. ```text Server URL: https://api.userjot.com/v1/mcp Authorization: Bearer YOUR_USERJOT_API_TOKEN ``` -------------------------------- ### Widget Control Methods Source: https://userjot.com/docs/widget-configuration Methods to programmatically open, close, or redirect the widget interface. ```APIDOC ## Widget Control Methods ### Description Methods to control the widget state and navigation. ### Methods - **window.uj.showWidget({ section })** - Opens the widget to a specific section ('feedback', 'roadmap', or 'updates'). - **window.uj.hideWidget()** - Closes the currently open widget. - **window.uj.redirect({ to, openFeedback, newTab })** - Redirects the user to the public UserJot site. ``` -------------------------------- ### UserJot MCP Server Endpoint Source: https://userjot.com/docs/mcp-overview The base URL for connecting remote MCP-compatible clients to UserJot. ```text https://api.userjot.com/v1/mcp ``` -------------------------------- ### Enable debug logging Source: https://userjot.com/docs/widget-sdk-reference Activates console logging for troubleshooting purposes. ```javascript window.uj.debug(); ``` -------------------------------- ### debug(options?) Source: https://userjot.com/docs/widget-sdk-reference Enables debug logging and optionally overrides the API base URL. ```APIDOC ## debug(options?) ### Description Enables debug logging and optionally overrides the API base URL. Primarily used for development and troubleshooting. ``` -------------------------------- ### Identify a user with profile fields Source: https://userjot.com/docs/sdk-swift-authentication Include email and additional profile data to provide a more consistent experience. ```swift UserJot.identify( userId: "user_123", email: "john@example.com" ) ``` ```swift UserJot.identify( userId: "user_123", email: "john@example.com", firstName: "John", lastName: "Doe", avatar: "https://example.com/avatar.jpg" ) ``` -------------------------------- ### Identify signed-in users Source: https://userjot.com/docs/widget-installation Use this method after initialization to associate user data with their feedback. The 'id' field is mandatory. ```html ``` -------------------------------- ### Implement Multiple SwiftUI Modifiers Source: https://userjot.com/docs/sdk-swift-common-flows Exposes feedback, roadmap, and changelog surfaces within a settings or help view. ```swift struct SettingsView: View { @State private var showingFeedback = false @State private var showingRoadmap = false @State private var showingChangelog = false var body: some View { List { Button("Send Feedback") { showingFeedback = true } Button("View Roadmap") { showingRoadmap = true } Button("What's New") { showingChangelog = true } } .userJotFeedback(isPresented: $showingFeedback) .userJotRoadmap(isPresented: $showingRoadmap) .userJotChangelog(isPresented: $showingChangelog) } } ``` -------------------------------- ### Add UserJot MCP server to Claude Code Source: https://userjot.com/docs/mcp-claude-code Registers the UserJot HTTP endpoint with the required authorization header. ```bash claude mcp add --transport http userjot https://api.userjot.com/v1/mcp \ --header "Authorization: Bearer YOUR_USERJOT_API_TOKEN" ``` -------------------------------- ### Implement SSO Endpoint with Hono Source: https://userjot.com/docs/single-sign-on This endpoint handles the SSO flow by generating a signed JWT containing user information and redirecting to the UserJot callback URL. Ensure the project secret remains on the server and is never exposed to the client. ```typescript import { Hono } from 'hono'; import jwt from 'jsonwebtoken'; const app = new Hono(); const USERJOT_PROJECT_ID = 'YOUR_PROJECT_ID'; const USERJOT_PROJECT_SECRET = 'YOUR_PROJECT_SECRET'; const USERJOT_CALLBACK_URL = 'https://api.userjot.com/auth/sso'; app.get('/userjot/sso', async (c) => { const state = c.req.query('state'); if (!state) { return c.text('Missing state', 400); } // Authenticate the user however your app normally does. const user = await getCurrentUser(c); const payload = { sub: user.id, email: user.email, firstName: user.firstName, lastName: user.lastName, iss: USERJOT_PROJECT_ID, aud: 'userjot' }; const token = jwt.sign(payload, USERJOT_PROJECT_SECRET, { algorithm: 'HS256', expiresIn: '10m' }); const callback = new URL(USERJOT_CALLBACK_URL); callback.searchParams.set('jwt', token); callback.searchParams.set('state', state); return c.redirect(callback.toString()); }); ``` -------------------------------- ### Enable macOS Network Entitlement Source: https://userjot.com/docs/sdk-swift-installation Required for sandboxed macOS apps to allow the SDK to load remote content. ```xml com.apple.security.network.client ``` -------------------------------- ### window.uj.identify(user) Source: https://userjot.com/docs/identify-users Identifies the current user to UserJot. Call this when the user logs in, when a session is restored, or when profile data changes. ```APIDOC ## window.uj.identify(user) ### Description Identifies the current signed-in user to UserJot. This allows the widget to personalize the experience and associate feedback activity with the correct user. ### Parameters - **user** (object | null) - Required - The user object containing identification details, or null to clear the current identity. ### User Object Fields - **id** (string) - Required - The stable identifier assigned to the user in your system. - **email** (string) - Optional - The user's email address. - **firstName** (string) - Optional - The user's first name. - **lastName** (string) - Optional - The user's last name. - **avatar** (string) - Optional - URL to the user's avatar image. - **signature** (string) - Optional - A server-generated signature for secure identification. - **traits** (object) - Optional - Custom attributes for the user. - **companies** (array) - Optional - An array of company objects associated with the user. ### Example ```javascript window.uj.identify({ id: 'user_123', email: 'john@example.com', firstName: 'John', lastName: 'Doe', avatar: 'https://example.com/avatar.jpg' }); ``` ``` -------------------------------- ### Identify User Source: https://userjot.com/docs/automatic-login Identify the currently signed-in user to the SDK. The ID field is required, and email is strongly recommended. ```html ``` -------------------------------- ### Retrieve Underlying URLs Source: https://userjot.com/docs/sdk-swift-common-flows Fetches raw URLs for use in custom WebView or app containers. ```swift let feedbackURL = UserJot.feedbackURL() let roadmapURL = UserJot.roadmapURL() let changelogURL = UserJot.changelogURL() ``` -------------------------------- ### Configure iOS Presentation Styles Source: https://userjot.com/docs/sdk-swift-common-flows Adjusts the sheet presentation style for iOS surfaces. ```swift UserJot.showFeedback() // default UserJot.showFeedback(presentationStyle: .sheet) // full-height sheet UserJot.showFeedback(presentationStyle: .mediumSheet) // medium sheet on supported versions ``` -------------------------------- ### Common identification pattern Source: https://userjot.com/docs/identify-users A standard implementation pattern for handling user login and logout states in a client application. ```javascript if (user) { window.uj.identify({ id: user.id, email: user.email, firstName: user.firstName, lastName: user.lastName, avatar: user.avatarUrl, signature: user.userJotSignature }); } else { window.uj.identify(null); } ``` -------------------------------- ### Add company data Source: https://userjot.com/docs/identify-users Attach company information to the user profile for B2B or account-based products. ```javascript window.uj.identify({ id: 'user_123', email: 'john@example.com', companies: [ { id: 'company_456', name: 'Acme Inc.', domain: 'acme.com', logo: 'https://example.com/acme-logo.png', traits: { plan: 'enterprise', industry: 'Software', companySize: 250 } } ] }); ``` -------------------------------- ### Set Widget Enabled Source: https://userjot.com/docs/widget-sdk-reference Toggles the visibility of the widget launcher. ```javascript window.uj.setWidgetEnabled(false); window.uj.setWidgetEnabled(true); ``` -------------------------------- ### URL Retrieval Methods Source: https://userjot.com/docs/sdk-swift-common-flows Methods to retrieve underlying URLs for custom presentation containers. ```APIDOC ## URL Retrieval Methods ### Description Retrieve the underlying URLs for feedback, roadmap, or changelog to load them in a custom WebView or container. ### Methods - `UserJot.feedbackURL()` - `UserJot.roadmapURL()` - `UserJot.changelogURL()` ``` -------------------------------- ### window.uj.identify(options | null) Source: https://userjot.com/docs/widget-sdk-reference Identifies the current user or clears the identity if null is passed. ```APIDOC ## window.uj.identify(options | null) ### Description Identifies the current user. Pass null to clear the current identity. ### Parameters - **id** (string) - Required - Stable user ID from your system - **email** (string) - Optional - Email address - **firstName** (string) - Optional - First name - **lastName** (string) - Optional - Last name - **avatar** (string) - Optional - Avatar URL - **signature** (string) - Optional - Server-generated HMAC signature - **traits** (object) - Optional - User traits object - **companies** (array) - Optional - Array of company objects ``` -------------------------------- ### setWidgetPosition(position) Source: https://userjot.com/docs/widget-sdk-reference Moves the launcher to the left or right side of the screen. ```APIDOC ## setWidgetPosition(position) ### Description Moves the launcher to the left or right side of the screen. ### Parameters - **position** (string) - Required - 'left' or 'right' ### Example ```javascript window.uj.setWidgetPosition('left'); ``` ``` -------------------------------- ### Control Embed Programmatically Source: https://userjot.com/docs/iframe-embed Use the controller returned by the embed function to navigate or destroy the instance. ```javascript const embed = window.uj.embed(); embed?.navigate('/updates'); embed?.navigate('/roadmap'); embed?.destroy(); ``` ```javascript window.uj.destroyEmbed(); ``` -------------------------------- ### Authentication Header Source: https://userjot.com/docs/mcp-overview Required HTTP header for authenticating requests to the UserJot MCP server. ```http Authorization: Bearer YOUR_USERJOT_API_TOKEN ``` -------------------------------- ### window.uj.setTrait(key, value) Source: https://userjot.com/docs/identify-users Updates a single trait for the currently identified user. ```APIDOC ## window.uj.setTrait(key, value) ### Description Updates a specific trait for the identified user after the initial identification call. ### Parameters - **key** (string) - Required - The name of the trait to update. - **value** (any) - Required - The value to assign to the trait. ### Example ```javascript window.uj.setTrait('plan', 'enterprise'); ``` ``` -------------------------------- ### Add user traits Source: https://userjot.com/docs/identify-users Send additional account context using the traits object or update individual traits using setTrait. ```javascript window.uj.identify({ id: 'user_123', email: 'john@example.com', traits: { plan: 'pro', companySize: 42, trialing: false } }); ``` ```javascript window.uj.setTrait('plan', 'enterprise'); window.uj.setTrait('trialing', false); ``` -------------------------------- ### window.uj.identify(user) Source: https://userjot.com/docs/iframe-embed Identifies the current user to the UserJot SDK, allowing the embed to reflect authenticated state. ```APIDOC ## window.uj.identify(user) ### Description Associates user information with the current session. This can be called before or after the embed is initialized. ### Parameters - **user** (object) - Required - **id** (string) - Required - Unique user identifier. - **email** (string) - Required - User email address. - **signature** (string) - Optional - Server-generated signature for authentication. ``` -------------------------------- ### Set Widget Position Source: https://userjot.com/docs/widget-sdk-reference Updates the launcher position to either the left or right side of the screen. ```javascript window.uj.setWidgetPosition('left'); window.uj.setWidgetPosition('right'); ``` -------------------------------- ### Embed Controller Methods Source: https://userjot.com/docs/iframe-embed Methods available on the object returned by `window.uj.embed()` to control the embedded instance. ```APIDOC ## Embed Controller Methods ### navigate(path) Navigates the embedded iframe to a specific path. - **path** (string) - The target path (e.g., '/updates', '/roadmap'). ### destroy() Removes the current embed instance from the DOM. ``` -------------------------------- ### Identify Users Source: https://userjot.com/docs/iframe-embed Pass user information to the SDK to maintain authentication state within the embedded portal. ```javascript window.uj.init('YOUR_PROJECT_ID', { onReady: () => { window.uj.identify({ id: 'user_123', email: 'john@example.com' }); window.uj.embed(); } }); ``` ```javascript window.uj.identify({ id: 'user_123', email: 'john@example.com', signature: 'SERVER_GENERATED_SIGNATURE' }); ``` -------------------------------- ### Implement SwiftUI Feedback Modifier Source: https://userjot.com/docs/sdk-swift-common-flows Uses a state-driven modifier to present the feedback interface in SwiftUI. ```swift import SwiftUI import UserJot struct ContentView: View { @State private var showingFeedback = false var body: some View { Button("Send Feedback") { showingFeedback = true } .userJotFeedback(isPresented: $showingFeedback) } } ``` -------------------------------- ### getWidgetState() Source: https://userjot.com/docs/widget-sdk-reference Returns the current widget state including visibility and active section. ```APIDOC ## getWidgetState() ### Description Returns the current widget state. ### Returns - **state** (object) - { isOpen: boolean, section: 'feedback' | 'roadmap' | 'updates' | null } ### Example ```javascript const state = window.uj.getWidgetState(); ``` ``` -------------------------------- ### Manage User Session State Source: https://userjot.com/docs/automatic-login Call identify with user data when logged in, or null when the user logs out. ```javascript if (user) { window.uj.identify({ id: user.id, email: user.email, firstName: user.firstName, lastName: user.lastName, signature: user.userJotSignature }); } else { window.uj.identify(null); } ``` -------------------------------- ### Identify user in SwiftUI Source: https://userjot.com/docs/sdk-swift-authentication Perform identification once the authentication state is ready in a SwiftUI app. ```swift @main struct MyApp: App { @StateObject private var authManager = AuthManager() init() { UserJot.setup(projectId: "YOUR_PROJECT_ID") } var body: some Scene { WindowGroup { ContentView() .onAppear { if let user = authManager.currentUser { UserJot.identify( userId: user.id, email: user.email ) } } } } } ``` -------------------------------- ### destroy() Source: https://userjot.com/docs/widget-sdk-reference Removes the widget instance and clears its runtime state. ```APIDOC ## destroy() ### Description Removes the widget instance and clears its runtime state. This is useful for page lifecycle management where the SDK needs to be torn down and recreated. ``` -------------------------------- ### Identify with server-side signature Source: https://userjot.com/docs/sdk-swift-authentication Use a server-generated signature for a stricter trust model. ```swift UserJot.identify( userId: "user_123", email: "john@example.com", signature: signatureFromYourServer ) ``` -------------------------------- ### Identify user on login Source: https://userjot.com/docs/sdk-swift-authentication Call identify after the app restores or creates an authenticated session. ```swift func handleLogin(user: User) { UserJot.identify( userId: user.id, email: user.email, firstName: user.firstName, lastName: user.lastName ) } ``` -------------------------------- ### SSO Callback Redirect Source: https://userjot.com/docs/single-sign-on After authenticating the user, redirect them back to the UserJot SSO endpoint with the signed JWT and the original state parameter. ```APIDOC ## GET https://api.userjot.com/auth/sso ### Description Redirect the authenticated user back to UserJot with a signed JWT and the original state parameter to complete the SSO flow. ### Method GET ### Endpoint https://api.userjot.com/auth/sso ### Parameters #### Query Parameters - **jwt** (string) - Required - The JWT signed with your UserJot Project Secret. - **state** (string) - Required - The original state parameter received from the initial redirect. ``` -------------------------------- ### Programmatic Widget Control Source: https://userjot.com/docs/widget-configuration Methods to trigger widget actions or redirect users to public pages. ```javascript window.uj.showWidget({ section: 'feedback' }); window.uj.showWidget({ section: 'roadmap' }); window.uj.showWidget({ section: 'updates' }); ``` ```javascript window.uj.hideWidget(); ``` ```javascript window.uj.redirect({ to: 'feedback' }); window.uj.redirect({ to: 'feedback', openFeedback: true }); window.uj.redirect({ to: 'updates', newTab: true }); ``` -------------------------------- ### Identify User Source: https://userjot.com/docs/widget-sdk-reference Sets the current user identity with optional traits and company associations. Pass null to clear the current identity. ```javascript window.uj.identify({ id: 'user_123', email: 'john@example.com', firstName: 'John', lastName: 'Doe', avatar: 'https://example.com/avatar.jpg', signature: 'SERVER_GENERATED_SIGNATURE', traits: { plan: 'pro', trialing: false }, companies: [ { id: 'company_456', name: 'Acme Inc.', domain: 'acme.com', logo: 'https://example.com/acme-logo.png', traits: { plan: 'enterprise', industry: 'Software', companySize: 250 } } ] }); ``` ```javascript window.uj.identify(null); ``` -------------------------------- ### List Boards Response Schema Source: https://userjot.com/docs/api The JSON structure returned upon a successful retrieval of the boards collection. ```json { "boards": [ { "id": "brd_001", "name": "Ideas", "slug": "ideas", "color": "indigo", "type": "public", "order": 1 }, { "id": "brd_002", "name": "Bugs", "slug": "bugs", "color": "violet", "type": "private", "order": 2 } ] } ``` -------------------------------- ### Destroy the widget instance Source: https://userjot.com/docs/widget-sdk-reference Clears the SDK runtime state and removes the widget instance, useful for clean teardowns. ```javascript window.uj.destroy(); ``` -------------------------------- ### Identify a user Source: https://userjot.com/docs/identify-users Call this method once the user is authenticated. The id field is mandatory, while other fields are optional. ```javascript window.uj.identify({ id: 'user_123', email: 'john@example.com', firstName: 'John', lastName: 'Doe', avatar: 'https://example.com/avatar.jpg' }); ``` -------------------------------- ### setWidgetEnabled(enabled) Source: https://userjot.com/docs/widget-sdk-reference Temporarily disables or re-enables the widget launcher. ```APIDOC ## setWidgetEnabled(enabled) ### Description Temporarily disables or re-enables the widget launcher. ### Parameters - **enabled** (boolean) - Required - true to enable, false to disable ### Example ```javascript window.uj.setWidgetEnabled(false); ``` ``` -------------------------------- ### window.uj.destroyEmbed() Source: https://userjot.com/docs/iframe-embed Globally tears down the current embed instance. ```APIDOC ## window.uj.destroyEmbed() ### Description Removes the active UserJot embed from the page globally. ```