Get the next question (deprecated 0.9)
curl --request POST \
--url https://api.zelinqa.ai/v1/next-questions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "<string>",
"conversation_history": [
{
"content": "<string>"
}
],
"context": "<string>",
"answered_question_ids": [
"<string>"
]
}
'import requests
url = "https://api.zelinqa.ai/v1/next-questions"
payload = {
"session_id": "<string>",
"conversation_history": [{ "content": "<string>" }],
"context": "<string>",
"answered_question_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: '<string>',
conversation_history: [{content: '<string>'}],
context: '<string>',
answered_question_ids: ['<string>']
})
};
fetch('https://api.zelinqa.ai/v1/next-questions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"next_question": {
"external_id": "<string>",
"text": "<string>"
},
"exhausted": true,
"nbq_version": "<string>",
"request_id": "<string>"
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}0.9 compatibility
Get the next question (deprecated 0.9)
deprecated
Deprecated compatibility route. New integrations must use the session lifecycle.
POST
/
v1
/
next-questions
Get the next question (deprecated 0.9)
curl --request POST \
--url https://api.zelinqa.ai/v1/next-questions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "<string>",
"conversation_history": [
{
"content": "<string>"
}
],
"context": "<string>",
"answered_question_ids": [
"<string>"
]
}
'import requests
url = "https://api.zelinqa.ai/v1/next-questions"
payload = {
"session_id": "<string>",
"conversation_history": [{ "content": "<string>" }],
"context": "<string>",
"answered_question_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: '<string>',
conversation_history: [{content: '<string>'}],
context: '<string>',
answered_question_ids: ['<string>']
})
};
fetch('https://api.zelinqa.ai/v1/next-questions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"next_question": {
"external_id": "<string>",
"text": "<string>"
},
"exhausted": true,
"nbq_version": "<string>",
"request_id": "<string>"
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json