curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/widget \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/widget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/widget"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "widget",
"agent_id": "support",
"widget_id": "wgt_l6ehq2niwfp5tpgw",
"enabled": true,
"domains": [
"example.com"
],
"character": "bot",
"characters": [
"none"
],
"placeholder": "<string>",
"suggestions": true,
"snippet": "<script src=\"https://guidinghand.ai/widget.js\" data-widget=\"wgt_l6ehq2niwfp5tpgw\" async></script>",
"share": true,
"share_url": "https://guidinghand.ai/a/k3bq7xw2m4rt5yzn6pdc"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Get the website widget
The agent’s website widget: its snippet and settings. Its widget_id is made the first time it’s asked for.
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/widget \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/widget', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/widget"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "widget",
"agent_id": "support",
"widget_id": "wgt_l6ehq2niwfp5tpgw",
"enabled": true,
"domains": [
"example.com"
],
"character": "bot",
"characters": [
"none"
],
"placeholder": "<string>",
"suggestions": true,
"snippet": "<script src=\"https://guidinghand.ai/widget.js\" data-widget=\"wgt_l6ehq2niwfp5tpgw\" async></script>",
"share": true,
"share_url": "https://guidinghand.ai/a/k3bq7xw2m4rt5yzn6pdc"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The agent’s id, e.g. billing.
Response
OK
The agent on websites: a character on a chat bar in the corner of your pages, added with one script tag. Visitors chat with the published version and see its moods (thinking, reading, scouring), not its steps. Saved as it changes, not with the agent's versions.
widget "support"
Public: it goes in the snippet.
"wgt_l6ehq2niwfp5tpgw"
Whether websites show it. Off, only your team can try it, in the console.
The sites that may show it, each with its subdomains. Empty: any site.
["example.com"]
none: the bar alone (the default). bot: a character standing on the bar, for accounts that have one (see characters).
bot, none The characters this widget can pick.
bot, none ["none"]
What the bar says before anyone types ('' shows "Ask a question").
60Visitors see typing suggestions (how they might finish their message; Tab accepts). On by default.
Paste it into your pages, before .
"<script src=\"https://guidinghand.ai/widget.js\" data-widget=\"wgt_l6ehq2niwfp5tpgw\" async></script>"
The share link is on: anyone with share_url chats with the published version on a page that's only the chat. Off by default.
The share link (null until it's first turned on). Works only while share is on.
"https://guidinghand.ai/a/k3bq7xw2m4rt5yzn6pdc"