# POST /v1/interactions/{interaction_id}/answer

> Answer it, whatever it is.

In [Interactions API](https://vestra.ai/developers/reference/api/interactions.md): What Bash waits on (approvals, questions, apps to connect, hand-offs, calls to your tools) and the answers.

Send `Authorization: Bearer vk_test_...` on every call.

Answer 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.

Your API key, or a session's token, scope `runtime` or `all`. On the card: [`answer`](https://vestra.ai/developers/answer.md). Every call here is a checked sample.

## Request

Path:

- `interaction_id` (`string`, required): What Bash waits on, by its id: `int_...`, or `call_...` for a call to your tool.

Headers:

- `Idempotency-Key` (`string`): Send the same key to retry this call safely for 24 hours.

Body:

Either `{ approve, present_user, message, nonce }`:

- `approve` (`boolean`, required): Yes 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.
- `present_user` (`boolean`): true when the person who saw it said yes. A yes that moves money, or is approved in person, needs it.
- `message` (`string`): With a no: a note for Bash, in at most 500 characters. Limits: 1 to 500 characters.
- `nonce` (`string`): For an action approved in person: the interaction's nonce, sent back. Limits: 1 to 4096 characters.

Or `{ answers }`:

- `answers` (`string[]`, required): One answer per question, in order: at most 4, each at most 4,000 characters. Limits: 1 to 4 items.

Or `{ done }`:

- `done` (`true`, required): For a hand-off: the person did it.

Or `{ could_not }`:

- `could_not` (`true`, required): For a hand-off: the person tried and could not.

Or `{ not_now }`:

- `not_now` (`true`, required): For a hand-off: not now; Bash carries on without it.

Or `{ output }`:

- `output` (`any`, required): For a call to your tool: what it returned, as any JSON.

Or `{ error }`:

- `error` (`string`, required): For a call to your tool: why it failed, in at most 4,000 characters. Limits: 1 to 4000 characters.

## Answers 200

- `id` (`string`): What you answered (int_... or call_...).
- `object` (`"interaction"`): Always 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.
- `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.

## Code

**TypeScript**

```ts
await vestra.answer('int_3j9', { approve: true, present_user: true });
```

**Python**

```python
vestra.answer("int_3j9", approve=True, present_user=True)
```

**CLI**

```bash
vestra answer int_3j9 --approve --present-user
```

**HTTP**

```bash
# 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" } }'
```

**MCP**

```json
{
  "method": "tools/call",
  "params": {
    "name": "answer",
    "arguments": { "interaction": "int_3j9", "approve": true, "present_user": true }
  }
}
```
