Create a new question
This API is used to submit questions to Miso.
After a question is submitted, a question_id is returned.
Then you can use question_id to check the latest status of it's answer
as it is being compiled.
- Type: string · Questionquestionrequired
The question for which an answer is requested.
- Type: string · Anonymous Idanonymous
_id The anonymous visitor who made this query.
- Type: string · Boost Fqboost
_fq Defines a query in Elasticsearch query-string syntax (Lucene) that can be used to boost a subset of products to the top of the ranking. For example, the query below will promote all the relevant products whose brand is
Niketo the top of recommendation list:{ "boost_fq": "brand:\"Nike\"" }For a slightly more complex example, the query below will promote the Nike products which have also been tagged as
ON SALEto the top of the ranking:{ "boost_fq": "brand:\"Nike\" AND tags:\"ON SALE\"" }It is worth mentioning that, Miso will only boost products that are relevant, and will not boost a low performance product only because it matches the boosting query.
- Type: string · Cite Endcite
_end The citation end marker. Example:
]or} - Type: integercite
_link Set to
1to include a link on each citation in the answer text. - Type: string · Cite Startcite
_start The citation start marker. Example:
[or{ - Type: stringcontext
_product _id The
product_idof the content the reader is viewing, for example the article on an article page. On a first question it grounds the question in that article, so a question like "are there other articles about this?" resolves to the article's actual subject instead of returning a false "I don't know". Ignored on follow-ups, where the conversation already carries the context. - Type: string · Fqfq
Defines a query in Elasticsearch query-string syntax (Lucene) that can be used to restrict the superset of products to return, without influencing the overall ranking.
fqcan enable users to drill down to products with specific features based on different product attributesFor example, the query below limits the search results to only show products whose size is either
MorSand brand isNike:{"fq": "size:(\"M\" OR \"S\") AND brand:\"Nike\""}You can use
fqto apply filters against your custom attributes as well. For example, the query below limits the search results to only products whosedesignerattribute isCalvin Klein{"fq": "attributes.designer:\"Calvin Klein\""}fqcan also limit search results by numerical range. For example, the following query limits the results to products that haverating >= 4.{"fq": "rating:[4 TO *]"} - Type: stringjwt
_token A signed JWT identifying the reader. Use it with a publishable key from the browser, instead of sending
user_idin the body. - Type: booleanlog
_user _history Whether to save this question to the reader's history. Set
falsefor a per-question private mode. See the User History APIs. - Type: objectmetadata
Any data you want stored alongside the request. Returned with the answer and available in your usage data, so you can attribute questions to a page, a placement, or a campaign.
- Type: string · Parent Question IdFormat: uuidparent
_question _id The UUID of the parent question if the current question is a follow-up to a previous question.
- application/json
- application/json
curl 'https://api.askmiso.com/v1/ask/questions?api_key=YOUR_SECRET_TOKEN' \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"anonymous_id": "visitor-8f3a1c",
"question": "How do interest rate cuts affect mortgages?"
}'
{
"data": {
"question_id": "123e4567-e89b-12d3-a456-426614174000"
},
"message": "success"
}