How do I specify Knowledge Base dynamically using an API?

Note: Use this reference for Arcade and Modern widgets.
The following API allows you to specify the name or ID of the Knowledge Base domain to be used.
Important: If you have already customized a domain for the current URL, the API cannot be used.
_nRepData["kb"] = "hebrew";
// or 
_nRepData["kb"] = "496477";

To use the API for a specific widget add the following:

_nRepData["embed"] =
{ 
  "kb": "hebrew"
}