> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superwize.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get widget by id

> Returns widget details and the latest thread for the current user when accessible.



## OpenAPI

````yaml https://api.superwize.ai/api/openapi.json post /widget/getWidget
openapi: 3.1.1
info:
  title: SuperWize API
  version: 1.1.2
  description: >-
    SuperWize RPC API. Authenticated endpoints support Better Auth session
    cookies, Authorization: Bearer <session_token>, or x-api-key.
servers:
  - url: http://api.superwize.ai/api
security: []
tags:
  - name: System
    description: Service health and internal diagnostics.
  - name: Authentication
    description: Session, email verification, and API token endpoints.
  - name: Audio
    description: Speech-to-text and related audio features.
  - name: Chat
    description: Conversation streaming, history, branching, and feedback.
  - name: Credits
    description: Credit balances, usage history, and reward grants.
  - name: Subscription
    description: Subscription tier and status polling endpoints.
  - name: Mini Apps
    description: Curated mini app catalog endpoints.
  - name: News
    description: Curated news feed, article source, and article feedback endpoints.
  - name: Release Notes
    description: Current app release metadata and features.
  - name: Support
    description: Contact/support request endpoints.
  - name: Images
    description: Image conversion, upload, and retrieval endpoints.
  - name: Files
    description: Generic file upload and retrieval endpoints.
  - name: Notifications
    description: Push token registration and test notifications.
  - name: Group Chat
    description: Group lifecycle, invites, messaging, and realtime events.
  - name: Preferences
    description: User preferences and account-type controls.
  - name: Widgets
    description: Widget thread and interaction endpoints.
  - name: Bookmarks
    description: Bookmark groups and conversation associations.
paths:
  /widget/getWidget:
    post:
      tags:
        - Widgets
      summary: Get widget by id
      description: >-
        Returns widget details and the latest thread for the current user when
        accessible.
      operationId: widget.getWidget
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                widgetId:
                  type: string
              required:
                - widgetId
            example:
              widgetId: wid_01JHKYX9T3EF123456789
      responses:
        '200':
          description: Widget lookup completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  widget:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
                          conversationId:
                            type: string
                          responseId:
                            type: string
                          config:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                          createdAt:
                            type: string
                            format: date-time
                            x-native-type: date
                          updatedAt:
                            type: string
                            format: date-time
                            x-native-type: date
                          thread:
                            anyOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  widgetId:
                                    type: string
                                  userId:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  status:
                                    enum:
                                      - active
                                      - completed
                                      - abandoned
                                  createdAt:
                                    type: string
                                    format: date-time
                                    x-native-type: date
                                  updatedAt:
                                    type: string
                                    format: date-time
                                    x-native-type: date
                                  messages:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        threadId:
                                          type: string
                                        data:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                        createdAt:
                                          type: string
                                          format: date-time
                                          x-native-type: date
                                      required:
                                        - id
                                        - threadId
                                        - data
                                        - createdAt
                                required:
                                  - id
                                  - widgetId
                                  - userId
                                  - status
                                  - createdAt
                                  - updatedAt
                              - type: 'null'
                        required:
                          - id
                          - type
                          - conversationId
                          - responseId
                          - config
                          - createdAt
                          - updatedAt
                          - thread
                      - type: 'null'
                required:
                  - widget
              example:
                widget:
                  id: obj_01JHKZ0PV2WX123456789
                  type: message
                  conversationId: conv_01JHKYW2V8XQ123456789
                  responseId: resp_01JHKYW6J6AB123456789
                  config: {}
                  createdAt: '2026-01-01T00:00:00.000Z'
                  updatedAt: '2026-01-01T00:00:00.000Z'
                  thread:
                    id: obj_01JHKZ0PV2WX123456789
                    widgetId: wid_01JHKYX9T3EF123456789
                    userId: user_01JHKYV8FMS234567890
                    status: active
                    createdAt: '2026-01-01T00:00:00.000Z'
                    updatedAt: '2026-01-01T00:00:00.000Z'
                    messages:
                      - id: obj_01JHKZ0PV2WX123456789
                        threadId: thr_01JHKYY5K4GH123456789
                        data: {}
                        createdAt: '2026-01-01T00:00:00.000Z'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: UNAUTHORIZED
                      status:
                        const: 401
                      message:
                        type: string
                        default: Authentication is required to access this endpoint.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message

````