Select a CTA
curl --request POST \
--url https://api.webless.ai/api/v1/cta-selection \
--header 'Content-Type: application/json' \
--data '
{
"query": "What does Webless do?"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What does Webless do?'})
};
fetch('https://api.webless.ai/api/v1/cta-selection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/cta-selection"
payload = { "query": "What does Webless do?" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"text": "<string>",
"url": "<string>",
"open_type": "self"
}{
"detail": [
{}
]
}Search API
Select a CTA
Returns the CTA text and destination URL for the same query context as the search response.
POST
/
api
/
v1
/
cta-selection
Select a CTA
curl --request POST \
--url https://api.webless.ai/api/v1/cta-selection \
--header 'Content-Type: application/json' \
--data '
{
"query": "What does Webless do?"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What does Webless do?'})
};
fetch('https://api.webless.ai/api/v1/cta-selection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/cta-selection"
payload = { "query": "What does Webless do?" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"text": "<string>",
"url": "<string>",
"open_type": "self"
}{
"detail": [
{}
]
}Call this after you create the
requestId for the user action. The response
returns CTA text and a target URL for the same context.Body
application/json
Was this page helpful?