Docs
patch

Update widget configuration

Updates widget settings for the authenticated website.

Widget Management
Endpoint
/widgets/{clientToken}
Method
patch
Plan Required
FREE
Authorization
Bearer Token required
Permissions
WRITE
Content-Type
application/json

API Tester(Loading...)

Loading API token configuration...

Payload

URL Parameters

clientTokenstringrequired

Widget client token

Body Parameters

Content-Type: application/jsonrequired

Schema:

color

string
#fff

buttonClass

string
No example

chatClass

string
No example

chatTitleClass

string
No example

chatInputClass

string
No example

buttonXPos

number
No example

buttonYPos

number
No example

buttonBgColor

string
#fff

buttonTextColor

string
#fff

bubbleColor

string
#fff

bubbleTextColor

string
#fff

websiteClientToken

string
No example

chatFormFields

string
No example

welcomeMessages

string
No example

ratingEnabled

boolean
No example

removeBranding

boolean
No example

chatEnabled

boolean
No example

Response

200Updated widget configuration

id

number
No example

color

string
No example

buttonClass

string
No example

chatClass

string
No example

chatTitleClass

string
No example

chatInputClass

string
No example

buttonXPos

number
No example

buttonYPos

number
No example

buttonBgColor

string
No example

buttonTextColor

string
No example

bubbleColor

string
No example

bubbleTextColor

string
No example

websiteClientToken

string
No example

chatFormFields

string
No example

welcomeMessages

string
No example

ratingEnabled

boolean
No example

removeBranding

boolean
No example

chatEnabled

boolean
No example
400Bad request - Invalid data
No response details available
401Unauthorized - Invalid or missing API token
No response details available
404Widget not found
No response details available

Expected Response

JSON
{
  "id": "abc123def456",
  "color": "sample_color",
  "buttonClass": "sample_buttonClass",
  "chatClass": "sample_chatClass",
  "chatTitleClass": "Software Engineer",
  "chatInputClass": "sample_chatInputClass",
  "buttonXPos": 42,
  "buttonYPos": 42,
  "buttonBgColor": "sample_buttonBgColor",
  "buttonTextColor": "Sample text content",
  "bubbleColor": "sample_bubbleColor",
  "bubbleTextColor": "Sample text content",
  "websiteClientToken": "sk-abc123def456ghi789",
  "chatFormFields": "sample_chatFormFields",
  "welcomeMessages": "Hello, this is a test message",
  "ratingEnabled": true,
  "removeBranding": true,
  "chatEnabled": true
}

API Access Token

Base URL

https://api.5chat.io