FAQ
Predict Answer
Predicts an answer corresponding to a question which is possibly contained in the phrase given an FAQ dataset. The FAQ API uses machine learning to generalize from the questions and answers in the dataset to infer the answer of the given question. This requires the active model for the dataset to be trained. Training a model usually takes around 1 minute after a dataset is created or updated. This endpoint yields an error if the model has not been trained yet.
post/api/v1/datasets/{datasetId}/predict-answer
Path parameters
datasetIdstring required
The unique ID that identifies the dataset for which a question should be answered.
Request body
Example request
{
"phrase": "Who founded MessageBird?"
}Response
A successful response.
Example response
{
"answer": {
"text": "Messagebird was founded by Robert Vis in 2011.",
"title": "MessageBird Founder",
"url": "https://messagebird.com/en/about"
},
"answerPredicted": false
}