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 |
/widgets/{clientToken}
WRITE
application/json
API Tester(Loading...)
Loading API token configuration...
Payload
URL Parameters
clientToken
stringrequiredWidget client token
Body Parameters
Content-Type:
application/json
requiredSchema:
Field | Type | Description / Example |
---|---|---|
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 |
color
#fff
buttonClass
No example
chatClass
No example
chatTitleClass
No example
chatInputClass
No example
buttonXPos
No example
buttonYPos
No example
buttonBgColor
#fff
buttonTextColor
#fff
bubbleColor
#fff
bubbleTextColor
#fff
websiteClientToken
No example
chatFormFields
No example
welcomeMessages
No example
ratingEnabled
No example
removeBranding
No example
chatEnabled
No example
Response
200Updated widget configuration
Field | Type | Description / Example |
---|---|---|
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 |
id
No example
color
No example
buttonClass
No example
chatClass
No example
chatTitleClass
No example
chatInputClass
No example
buttonXPos
No example
buttonYPos
No example
buttonBgColor
No example
buttonTextColor
No example
bubbleColor
No example
bubbleTextColor
No example
websiteClientToken
No example
chatFormFields
No example
welcomeMessages
No example
ratingEnabled
No example
removeBranding
No example
chatEnabled
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