How to Select Menu Options via API - Menu Selection Not Being Processed

Problem Summary:

I’m trying to interact with my MindStudio workflow via API, but menu selections aren’t being processed. The API keeps returning the same menu instead of routing to the selected chapter workflow.

My Workflow Setup:

  • Entry workflow: knowledgebase.flow

  • Workflow structure: Start → Menu → Jump to individual chapter workflows

  • The menu has 13 chapter options, each routing to a different workflow

  • Each chapter has its own knowledge base for Q&A

What I’m Trying to Do:

  1. Call the API to initialize and get the menu (✓ Working)

  2. Select a chapter from the menu (:cross_mark: Not working)

  3. Ask questions about the selected chapter

API Calls:

Request 1 - Get Menu (Working):

json

POST https://v1.mindstudio-api.com/developer/v2/agents/run

{
  "workerId": "{WORKERID}",
  "workflow": "knowledgebase.flow",
  "variables": {}
}

Response includes:

  • threadId

  • currentContinuationAction.token

  • Menu with options (each having id, label, destinationStepId)

Request 2 - Select Menu Option (Not Working):

json

POST https://v1.mindstudio-api.com/developer/v2/agents/run

{
  "workerId": "{WORKERID}",
  "threadId": "{{threadId}}",
  "response": {
    "token": "{{continuationToken}}",
    "selectedOptionId": "{OPTIONID}"
  }
}

The Problem:

The response to Request 2 shows:

  • hasContent: false

  • isRunning: false

  • isFinished: false

  • Returns the same menu again with the same continuation token

  • The workflow never jumps to the selected chapter

What I’ve Tried:

  • Using selectedOptionId in the response object

  • Different request formats

  • Hardcoding values instead of variables

  • Verified the threadId and token are correct

Questions:

  1. What is the correct format for selecting a menu option via API?

  2. Should I use selectedOptionId, value, menuSelection, or something else?

  3. Is there a different endpoint for menu continuations?

  4. Do I need to structure the response object differently for menu selections vs other continuation types?

Expected Behavior:

After selecting a menu option, the workflow should jump to the corresponding chapter workflow, and I should get a new continuation token for that chapter’s workflow where I can then ask questions.

Additional Context:

  • Using Postman for testing

  • API Key authentication is working

  • The workflow works perfectly in the MindStudio preview interface

  • Just need the correct API format for menu selections

Any help or documentation on the correct request structure would be greatly appreciated!


Attachments to Include (if possible):

  • Screenshot of your workflow diagram

  • Screenshot of the menu response JSON

  • Screenshot of the failed selection response

This should help the community understand your issue and provide the right solution!

Hi @SheheryarRamzan,

Thanks for the post!

The Menu block, along with other user-facing blocks like User Input and User Context, isn’t designed for Agents triggered via API. If you’re trying to replicate the Menu block’s behavior, I’d suggest using a Logic block or a Custom Function to branch your workflow.