Webhooks

Get webchat embed script

GET
/api/webhook/webchat-script

Public endpoint returning the JavaScript webchat widget loader with the resolved configuration (colors, position, starter message, etc.) inlined. Used by the <script src="…webchat-script?webchatConfigId=…"> tag a customer pastes onto their site.

Query Parameters

webchatConfigId*string

Response Body

application/javascript

application/json

application/json

curl -X GET "https://example.com/api/webhook/webchat-script?webchatConfigId=string"
"(function(){var w=window,d=document,c={webchatConfigId:\"64a1b2c3d4e5f60012345678\",primaryColor:\"#3B82F6\",position:\"bottom-right\",starterMessage:\"Hi! How can we help?\",apiBaseUrl:\"https://api.tetherai.ca\"};w.__TETHER_WEBCHAT__=c;var s=d.createElement(\"script\");s.src=c.apiBaseUrl+\"/static/webchat-runtime.js\";s.async=true;d.head.appendChild(s);})();"