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

# Create Widget

> Create a new assistant



## OpenAPI

````yaml https://api.insighto.ai/api/v1/openapi.json post /api/v1/widget
openapi: 3.1.0
info:
  title: Ragify
  version: v1
servers: []
security: []
paths:
  /api/v1/widget:
    post:
      tags:
        - Widget
      summary: Create Widget
      description: Create a new assistant
      operationId: create_widget_api_v1_widget_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IWidgetCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPostResponseBase_IWidgetRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Your API Key: []
        - HTTPBearer: []
components:
  schemas:
    IWidgetCreate:
      properties:
        org_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Org Id
        widget_type:
          anyOf:
            - $ref: '#/components/schemas/IWidgetEnum'
            - type: 'null'
        assistant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Assistant Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          default: {}
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        intro_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Intro Message
        user_opening_messages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: User Opening Messages
        header_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Header Color
        user_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: User Message Color
        bot_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Message Color
        bot_icon_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Icon Color
        remove_branding:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Remove Branding
          default: false
        ice_break_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Ice Break Color
        bubble_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bubble Color
        bubble_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Bubble Text
        bot_text_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Text Message Color
        user_text_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: User Text Message Color
        header_text_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Header Text Color
        textbox_default_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Textbox Default Text
        action_buttons:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Action Buttons
        action_buttons_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Buttons Color
        style_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Style Params
          default: {}
      type: object
      required:
        - widget_type
        - user_opening_messages
        - action_buttons
      title: IWidgetCreate
    IPostResponseBase_IWidgetRead_:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: Data created successfully
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - {}
            - type: 'null'
          title: Meta
          default: {}
        data:
          anyOf:
            - $ref: '#/components/schemas/IWidgetRead'
            - type: 'null'
      type: object
      title: IPostResponseBase[IWidgetRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IWidgetEnum:
      type: string
      enum:
        - chat
        - html
        - whatsapp
        - phone
        - html_call
        - leadconnector
        - leadconnector_call
        - sms
        - fb_messenger
        - instagram
        - web_call
        - plivo_call
        - telnyx_call
        - telegram
        - render_form
        - sip
      title: IWidgetEnum
    IWidgetRead:
      properties:
        org_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Org Id
        widget_type:
          anyOf:
            - $ref: '#/components/schemas/IWidgetEnum'
            - type: 'null'
        assistant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Assistant Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          default: {}
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        intro_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Intro Message
        user_opening_messages:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: User Opening Messages
        header_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Header Color
        user_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: User Message Color
        bot_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Message Color
        bot_icon_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Icon Color
        remove_branding:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Remove Branding
          default: false
        ice_break_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Ice Break Color
        bubble_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bubble Color
        bubble_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Bubble Text
        bot_text_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Text Message Color
        user_text_message_color:
          anyOf:
            - type: string
            - type: 'null'
          title: User Text Message Color
        header_text_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Header Text Color
        textbox_default_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Textbox Default Text
        action_buttons:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Action Buttons
        action_buttons_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Buttons Color
        style_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Style Params
          default: {}
        id:
          type: string
          format: uuid
          title: Id
        conversation_bot_icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Bot Icon
        bubble_bot_icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Bubble Bot Icon
        provider_user_friendly_label:
          type: string
          title: Provider User Friendly Label
        widget_provider:
          type: string
          title: Widget Provider
      type: object
      required:
        - widget_type
        - user_opening_messages
        - action_buttons
        - id
        - conversation_bot_icon
        - bubble_bot_icon
        - provider_user_friendly_label
        - widget_provider
      title: IWidgetRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Your API Key:
      type: apiKey
      description: >-
        Your API key for authentication. You can generate it from the
        **Settings** page. Format: starts with `in-`.
      in: query
      name: api_key
    HTTPBearer:
      type: http
      scheme: bearer

````