Skip to content
SoulFire LogoSoulFire

Click dialog button

POST
/v1/instances/{instance_id}/bots/{bot_id}/dialog/buttons/{button_index}:click

Clicks a button in the current dialog. Button index depends on dialog type (see BotClickDialogButtonRequest). The dialog is typically closed after the button click. Note: Full dialog button packets are not yet implemented; this clears local state.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The UUID of the SoulFire instance containing the bot.

Formatuuid
bot_id*string

The profile UUID of the bot clicking the button.

Formatuuid
button_index*integer

Index of the button to click. For NOTICE: 0 for the action button For CONFIRMATION: 0 for yes, 1 for no For MULTI_ACTION: index into the actions list Special value: -1 to close/escape the dialog

Formatint32

Response Body

Response for dialog button click.

application/json
  1. response

Response for dialog button click.

success*boolean

Whether the button click was processed successfully.

error?|

Error message if success is false. Possible errors: "No dialog is currently displayed"

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/dialog/buttons/0:click'
Example Response
{
  "success": true,
  "error": "string"
}

Was this page helpful?