openapi: 3.2.0 info: title: Pypestream JavaScript SDK Configuration API description: "Client-side JavaScript SDK for embedding conversational AI chat interfaces into web applications.\n\n**Note:** This is a client-side SDK, not a REST API. This OpenAPI specification documents the SDK's \npublic methods and configurations for documentation purposes.\n\n## Getting Started\n\nInclude the SDK script in your HTML:\n```html\n\n```\n\nThen use the global `Pypestream` object to interact with the SDK.\n\n## Display Modes\n\n- **Window Mode**: Opens chat in a popup window\n- **Inline Mode**: Embeds chat directly in your webpage\n" version: 3.0.0 contact: name: Pypestream Support url: https://support.pypestream.com license: name: Proprietary url: https://pypestream.com/terms servers: - url: https://api.pypestream.com/v3 description: Production SDK API (Documentation Only) security: [] tags: - name: Configuration description: SDK configuration methods paths: /config: post: tags: - Configuration summary: Configure SDK description: "Configure the Pypestream SDK before initialization. Can be called before `boot()`.\n\n**JavaScript Usage:**\n```javascript\nPypestream.config({\n APP_ID: 'your-app-id',\n debugMode: true,\n displayMode: 'inline'\n});\n```\n" operationId: config requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PypestreamConfig' examples: basic: summary: Basic configuration value: APP_ID: your-app-id-here debugMode: false displayMode: window inline: summary: Inline mode with loader value: APP_ID: your-app-id-here debugMode: true displayMode: inline withInlineAppLoader: true withMessages: summary: With initial messages value: APP_ID: your-app-id-here displayMode: window initialMessages: welcomeMessage: Hello! How can I help you? showNextThinkingBubble: true responses: '200': description: Configuration applied successfully content: application/json: schema: type: object properties: success: type: boolean example: true message: type: string example: Configuration applied /updateConfig: patch: tags: - Configuration summary: Update configuration dynamically description: "Updates the Pypestream configuration dynamically after initialization.\n\n**JavaScript Usage:**\n```javascript\nPypestream.updatePypestreamConfig({\n debugMode: true,\n initialMessages: {\n welcomeMessage: 'Updated welcome!'\n }\n});\n```\n\n**Requirements:**\n- Must call after iframe is mounted\n- Merges with existing configuration\n" operationId: updatePypestreamConfig requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PypestreamConfig' responses: '200': description: Configuration updated successfully content: application/json: schema: type: object properties: success: type: boolean example: true '400': description: Cannot update configuration content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object required: - error - message properties: error: type: string description: Error type example: Configuration Error message: type: string description: Detailed error message example: You must provide an APP_ID string in the config object details: type: object description: Additional error details additionalProperties: true InitialMessages: type: object description: Configure initial welcome messages properties: welcomeMessage: type: string description: Custom welcome message text example: Hello! How can I help you today? showNextThinkingBubble: type: boolean description: Show thinking bubble animation default: true example: true PypestreamConfig: type: object required: - APP_ID properties: APP_ID: type: string description: Your Pypestream application ID (required) example: your-app-id-here debugMode: type: boolean description: Enable debug logging in console default: false example: true displayMode: type: string enum: - window - inline description: Display mode for the chat interface default: window example: inline APIMode: type: boolean description: Enable API mode default: true example: true withInlineAppLoader: type: boolean description: Show loading animation in inline mode default: true example: true showSurveyForWindowMode: type: boolean description: Enable survey in window mode after chat ends example: false initialMessages: $ref: '#/components/schemas/InitialMessages' securitySchemes: ApiKey: type: apiKey in: header name: X-API-Key description: 'API key for accessing Pypestream services (if applicable). Note: The JavaScript SDK does not require API keys for client-side usage. ' externalDocs: description: Full Pypestream Documentation url: https://docs.pypestream.com