Skip to main content

Ask the bot instance a question

Deprecated since Strategy ONE (September 2025)

caution

The API has been deprecated and will be completely unavailable in the near future.

This deprecation is due to the introduction of our new Auto Agent technology, which replaces the legacy Auto Bot system. Legacy Auto Bot support will be gradually discontinued after Strategy One (September 2025).

This workflow sample demonstrates how to ask the bot instance a question.

info

Obtain the authorization token needed to execute the request using POST /api/auth/login.

Ask the bot instance a question

Endpoint: POST /api/bots/{botId}/instances/{instanceId}/questions

note

Replace {botId} in POST /api/bots/{botId}/instances/{instanceId}/questions with the chatbot ID and {instanceId} with your bot instance ID created with POST /api/bots/{botId}/instances in your environment.

Sample Request Body:

{
"text": "What is the average revenue for year 2023"
}

Sample Curl:

curl 'https://demo.microstrategy.com/MicroStrategyLibrary/api/bots/6C6D314E4C881C01BFD79084DD5B2D42/instances/5B1EB48585F04384A97F3D831D7C7416/questions' \
-X 'POST' \
--header 'X-MSTR-AuthToken: t40ltbk411923ipk85r8r0tace' \
--header 'X-MSTR-ProjectID: FCC1924411EAABC39C6C0080EFA54501' \
--header 'Prefer: respond-async' \
--header 'Content-Type: application/json' \
--data '{
"text": "What is the average revenue for year 2023"
}'

Sample Response:

Response CodeStatus
201Successfully accept the bot question
400Error in accepting the bot question
401Authorization failed
404Bot or bot instance does not exist

Sample Response Body on success:

{
"id": "5B1EB48585F04384A97F3D831D7C7416"
}