Interactions
What Bash waits on (approvals, questions, apps to connect, hand-offs, calls to your tools) and the answers.
POST/v1/interactions/{interaction_id}/answerAnswer it, whatever it is.
An approval takes approve (true or false), a question answers or approve: false, a hand-off done, could_not or not_now (or answers, when it asks for a value such as a code), a client tool call output or error. A money or account approval, and the yes to a company action (a tool of your MCP servers, or a function of yours that is not read-only or run without asking), must carry present_user: true. A body that fits another kind is 400 answer_mismatch.
Request12 fields
Path
interaction_idstringrequiredWhat Bash waits on, by its id: int_..., or call_... for a call to your tool.
- Type
string
Headers
Idempotency-KeystringSend the same key to retry this call safely for 24 hours.
- Type
string
Body
Either { approve, present_user, message, nonce }
approvebooleanrequiredYes or no to an approval. For a connection, only no: your user connects the app with POST /v1/connections, and the item settles itself. false also skips a question.
- Type
boolean
present_userbooleantrue when the person who saw it said yes. A yes that moves money, or is approved in person, needs it.
- Type
boolean
messagestringWith a no: a note for Bash, in at most 500 characters.
- Limits
- 1 to 500 characters.
noncestringFor an action approved in person: the interaction's nonce, sent back.
- Limits
- 1 to 4096 characters.
Or { answers }
answersstring[]requiredOne answer per question, in order: at most 4, each at most 4,000 characters.
- Limits
- 1 to 4 items.
Or { done }
donetruerequiredFor a hand-off: the person did it.
- Type
true
Or { could_not }
could_nottruerequiredFor a hand-off: the person tried and could not.
- Type
true
Or { not_now }
not_nowtruerequiredFor a hand-off: not now; Bash carries on without it.
- Type
true
Or { output }
outputanyrequiredFor a call to your tool: what it returned, as any JSON.
- Type
any
Or { error }
errorstringrequiredFor a call to your tool: why it failed, in at most 4,000 characters.
- Limits
- 1 to 4000 characters.
Answers 2004 fields
idstringWhat you answered (int_... or call_...).
- Type
string
object"interaction"Always interaction.
- Type
"interaction"
type"approval" | "question" | "connect" | "handoff" | "tool_call"What kind of answer it takes. approval: yes or no. question: an answer to each question. connect: your user connects an app. handoff: a person does one thing, then says so. tool_call: your tool returns an output or an error.
- Type
"approval" | "question" | "connect" | "handoff" | "tool_call"
status"resolved" | "completed" | "failed"resolved: Bash has your answer and carries on. For a call to your tool: completed with your output, or failed with your error.
- Type
"resolved" | "completed" | "failed"
await vestra.answer('int_3j9', { approve: true, present_user: true });vestra.answer("int_3j9", approve=True, present_user=True)vestra answer int_3j9 --approve --present-user# List what Bash is waiting on. For one user, this lists approvals, questions, hand-offs, apps to connect and# calls to your tools.curl "$VESTRA_BASE_URL/v1/interactions?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" # Approve or deny. A payment or hands-on approval needs present_user: true, and a hands-on approval also needs# its nonce. To say no, send approve: false.curl "$VESTRA_BASE_URL/v1/interactions/int_3j9/answer" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "approve": true, "present_user": true }' # Answer a question. Send one answer per question.curl "$VESTRA_BASE_URL/v1/interactions/int_7qp/answer" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "answers": ["The 09:15 flight"] }' # Return your tool's result. Answer a call to one of your tools with its output, or an error.curl "$VESTRA_BASE_URL/v1/interactions/call_4mz/answer" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "output": { "status": "confirmed", "pnr": "100042" } }'{ "method": "tools/call", "params": { "name": "answer", "arguments": { "interaction": "int_3j9", "approve": true, "present_user": true } }}