curl --request PATCH \
--url https://guidinghand.ai/v1/agents/{agent_id}/widget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"domains": [
"example.com"
],
"placeholder": "<string>",
"suggestions": true,
"share": true,
"new_share_link": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
domains: ['example.com'],
placeholder: '<string>',
suggestions: true,
share: true,
new_share_link: true
})
};
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"
payload = {
"enabled": True,
"domains": ["example.com"],
"placeholder": "<string>",
"suggestions": True,
"share": True,
"new_share_link": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, 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>"
}
}{
"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>"
}
}Change the website widget
Changes the widget’s settings; the ones you leave out keep their value. They take effect at once. Needs the admin role or an API key.
curl --request PATCH \
--url https://guidinghand.ai/v1/agents/{agent_id}/widget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"domains": [
"example.com"
],
"placeholder": "<string>",
"suggestions": true,
"share": true,
"new_share_link": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
domains: ['example.com'],
placeholder: '<string>',
suggestions: true,
share: true,
new_share_link: true
})
};
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"
payload = {
"enabled": True,
"domains": ["example.com"],
"placeholder": "<string>",
"suggestions": True,
"share": True,
"new_share_link": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, 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>"
}
}{
"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.
Body
20["example.com"]
bot, none 60Turn the share link on or off. Off, the link stops working; on again, it's the same link.
Make a new share link: the old one stops working at once.
true 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"