curl --request POST \
--url https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answers": [
{
"selected": [
"Postgres"
]
},
{
"text": "Keep the old table for a week."
}
],
"client_message_id": "4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90"
}
'import requests
url = "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer"
payload = {
"answers": [{ "selected": ["Postgres"] }, { "text": "Keep the old table for a week." }],
"client_message_id": "4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
answers: [{selected: ['Postgres']}, {text: 'Keep the old table for a week.'}],
client_message_id: '4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90'
})
};
fetch('https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answers' => [
[
'selected' => [
'Postgres'
]
],
[
'text' => 'Keep the old table for a week.'
]
],
'client_message_id' => '4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"selected\": [\n \"Postgres\"\n ]\n },\n {\n \"text\": \"Keep the old table for a week.\"\n }\n ],\n \"client_message_id\": \"4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"selected\": [\n \"Postgres\"\n ]\n },\n {\n \"text\": \"Keep the old table for a week.\"\n }\n ],\n \"client_message_id\": \"4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answers\": [\n {\n \"selected\": [\n \"Postgres\"\n ]\n },\n {\n \"text\": \"Keep the old table for a week.\"\n }\n ],\n \"client_message_id\": \"4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "question",
"status": "pending",
"session_id": "<string>",
"asked_in_session_id": "<string>",
"resumes_session_id": "<string>",
"for_user_id": "<string>",
"requires_role": "owner_or_admin",
"origin": {
"session_id": "<string>",
"title": "<string>",
"reason_name": "<string>"
},
"created_at": "<string>",
"expires_at": "<string>",
"reason": "<string>",
"label": "<string>",
"question": {
"wait_for_answer": true,
"questions": [
{
"header": "<string>",
"question": "<string>",
"multi_select": true,
"options": [
{
"label": "<string>",
"description": "<string>"
}
]
}
],
"decision_timeout": {
"assumption": "<string>",
"at": "<string>"
},
"computer_auth": {
"target": "cloud",
"reason": "<string>"
}
},
"secret_request": {
"name": "<string>",
"label": "<string>",
"placeholder": "<string>",
"value_prefix": "<string>",
"replace": true,
"broker_hosts": [
"<string>"
],
"reason_id": "<string>",
"reason_name": "<string>",
"reason_team": true
},
"network_hosts": {
"hosts": [
"<string>"
]
},
"permission_rules": {
"changes": [
"<string>"
]
},
"connector": {
"provider": "<string>",
"slug": "<string>",
"server_id": "<string>",
"plugin": "<string>",
"description": "<string>",
"icon": "<string>",
"auth_type": "none",
"auth_scheme": "basic",
"fields": [
{
"name": "<string>",
"label": "<string>",
"description": "<string>",
"required": true
}
],
"url": "<string>",
"documentation_url": "<string>",
"website_url": "<string>",
"registry_name": "<string>",
"registry_version": "<string>",
"repository": "<string>",
"configure_url": "<string>",
"reconnect": true,
"reason_id": "<string>",
"reason_name": "<string>"
},
"actions": [
"answer"
],
"app_url": "<string>"
}{
"error": "prompt_required"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{}{
"error": "session_not_found"
}{}{}{}{}Answer a question
Answer a question a Session asked, as the web app’s question card does. The first answer wins; give one answer per question, as option labels, text or both.
curl --request POST \
--url https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"answers": [
{
"selected": [
"Postgres"
]
},
{
"text": "Keep the old table for a week."
}
],
"client_message_id": "4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90"
}
'import requests
url = "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer"
payload = {
"answers": [{ "selected": ["Postgres"] }, { "text": "Keep the old table for a week." }],
"client_message_id": "4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
answers: [{selected: ['Postgres']}, {text: 'Keep the old table for a week.'}],
client_message_id: '4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90'
})
};
fetch('https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'answers' => [
[
'selected' => [
'Postgres'
]
],
[
'text' => 'Keep the old table for a week.'
]
],
'client_message_id' => '4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"selected\": [\n \"Postgres\"\n ]\n },\n {\n \"text\": \"Keep the old table for a week.\"\n }\n ],\n \"client_message_id\": \"4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"selected\": [\n \"Postgres\"\n ]\n },\n {\n \"text\": \"Keep the old table for a week.\"\n }\n ],\n \"client_message_id\": \"4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"answers\": [\n {\n \"selected\": [\n \"Postgres\"\n ]\n },\n {\n \"text\": \"Keep the old table for a week.\"\n }\n ],\n \"client_message_id\": \"4b7f0d2e-8c1a-4f0e-9a51-2f6c3d1e7b90\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "question",
"status": "pending",
"session_id": "<string>",
"asked_in_session_id": "<string>",
"resumes_session_id": "<string>",
"for_user_id": "<string>",
"requires_role": "owner_or_admin",
"origin": {
"session_id": "<string>",
"title": "<string>",
"reason_name": "<string>"
},
"created_at": "<string>",
"expires_at": "<string>",
"reason": "<string>",
"label": "<string>",
"question": {
"wait_for_answer": true,
"questions": [
{
"header": "<string>",
"question": "<string>",
"multi_select": true,
"options": [
{
"label": "<string>",
"description": "<string>"
}
]
}
],
"decision_timeout": {
"assumption": "<string>",
"at": "<string>"
},
"computer_auth": {
"target": "cloud",
"reason": "<string>"
}
},
"secret_request": {
"name": "<string>",
"label": "<string>",
"placeholder": "<string>",
"value_prefix": "<string>",
"replace": true,
"broker_hosts": [
"<string>"
],
"reason_id": "<string>",
"reason_name": "<string>",
"reason_team": true
},
"network_hosts": {
"hosts": [
"<string>"
]
},
"permission_rules": {
"changes": [
"<string>"
]
},
"connector": {
"provider": "<string>",
"slug": "<string>",
"server_id": "<string>",
"plugin": "<string>",
"description": "<string>",
"icon": "<string>",
"auth_type": "none",
"auth_scheme": "basic",
"fields": [
{
"name": "<string>",
"label": "<string>",
"description": "<string>",
"required": true
}
],
"url": "<string>",
"documentation_url": "<string>",
"website_url": "<string>",
"registry_name": "<string>",
"registry_version": "<string>",
"repository": "<string>",
"configure_url": "<string>",
"reconnect": true,
"reason_id": "<string>",
"reason_name": "<string>"
},
"actions": [
"answer"
],
"app_url": "<string>"
}{
"error": "prompt_required"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{}{
"error": "session_not_found"
}{}{}{}{}question request the way the web app’s question card does: the same admission as sendSessionMessage with question_operation_id, so the first answer wins, a question addressed to one member (for_user_id) is theirs alone, and a question shown in a Reason’s conversation is answered in the Session that asked it. Give one answer per question, in order: selected option labels, your own text, or both. Retrying with the same client_message_id returns the request without answering twice. Returns the request as getSessionInputRequest reads it after the answer (it may still read pending for a moment while the turn takes it).
Scope: runAuthorizations
Your Reason API key from Settings › API keys. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, devices:read, devices:write, devices:use, computers:read, computers:write, ssh:write, knowledge:read, memory:read, memory:write, skills:read, skills:write, pages:read, pages:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. devices:write, devices:use, computers:read, computers:write, ssh:write, network:read and network:write are opt-in, excluded from default keys. computers:read lists visible cloud and connected computers without waking them or granting execution access. devices:read discovers local Device targets; devices:use separately consents to local execution, so a discover-and-run local workflow needs both. devices:write manages enrollment and device grants; computers:write creates or deletes cloud computers; ssh:write manages retained SSH access. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).
Path Parameters
Body
Response
The request after the answer.
pending: still waiting on a person. Questions: answered, moved_past (a person's later message in the Session settled it without answering it), cancelled, withdrawn (the agent took it back), timed_out (its wait or decision timeout ended it) or closed (any other end). network_hosts: allowed, declined, completed (every host was allowed elsewhere) or expired. permission_rules: applied, declined or expired. secret: completed (a value was saved and the Session resumed), declined (its member's Not now), moved_past (a person wrote in the Session since it: a value still continues it, but it can no longer be declined) or expired. Other connection types: completed (a connection resumed the Session), expired (after their receipt or 24 hours) or closed (the Session was cancelled or archived); their pending state is best effort, because the server records no answer for them.
pending, answered, moved_past, cancelled, withdrawn, timed_out, closed, allowed, declined, applied, completed, expired What this caller can do with it through the API now. Only actions an API route serves are listed: answer (a pending question this caller may answer; answerSessionInputRequest), approve and deny (a network_hosts or permission_rules request, for an owner or admin; approve also on a network_hosts request that reads completed, to record the answer), secret (provide the value of the member's own pending or moved_past secret request; REST provideInputRequestSecret, not an MCP tool), and cancel (the member's own pending secret request whose value is not stored yet: declining continues its Session). approve and secret are REST and web app only, never MCP tools: a person decides an approval and types a secret value in their own client. Empty when the request is settled or must be completed in the web app: open app_url. A hint: every action checks again, so an action listed here can still be refused if the request changed since it was read.
answer, approve, deny, secret, cancel 
