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

# Get widget settings

> Read public widget settings from an allowed website origin. Authorization and resource ownership are evaluated on every request.



## OpenAPI

````yaml /openapi/widget.json get /api/v1/chat/widget/{siteID}
openapi: 3.1.0
info:
  title: Widget API
  version: 1.0.0
  description: >-
    Embed Writine chat on your own site. These endpoints need no Writine
    account: the widget routes are authorised by your site origin allowlist, and
    the visitor routes by a token issued when a conversation starts.
servers:
  - url: https://api.writine.com
    description: Production
security: []
paths:
  /api/v1/chat/widget/{siteID}:
    get:
      summary: Get widget settings
      description: >-
        Read public widget settings from an allowed website origin.
        Authorization and resource ownership are evaluated on every request.
      operationId: chat_get__api_v1_chat_widget__siteID_
      parameters:
        - in: path
          name: siteID
          required: true
          schema:
            type: string
            maxLength: 100
        - in: header
          name: Origin
          required: true
          schema:
            type: string
            format: uri
          description: >-
            Must exactly match the website's allowlist. Visitor tokens are bound
            to this origin.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      site_id:
                        type: string
                        maxLength: 100
                      name:
                        type: string
                        maxLength: 256
                      brand:
                        type: string
                        maxLength: 256
                      icon:
                        type: string
                        maxLength: 256
                      online:
                        type: boolean
                      color:
                        type: string
                        maxLength: 256
                      position:
                        type: string
                        maxLength: 256
                      greeting:
                        type: string
                        maxLength: 256
                      offline_message:
                        type: string
                        maxLength: 256
                    required:
                      - site_id
                      - name
                      - brand
                      - icon
                      - online
                      - color
                      - position
                      - greeting
                      - offline_message
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '400':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '401':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '403':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '404':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '409':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '429':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '500':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
        '503':
          description: Typed error envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  result:
                    type: object
                    properties:
                      code:
                        type: string
                        maxLength: 256
                    required:
                      - code
                    additionalProperties: false
                  message:
                    type: string
                    maxLength: 256
                required:
                  - success
                  - result
                  - message
                additionalProperties: false
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.