### 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