curl --request POST \
--url https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny', 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}/deny",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/deny")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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": "missing_bearer",
"message": "Authorization required"
}{}{
"error": "session_not_found"
}{}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}{}Decline a network or permission request
Decline a Session’s network or permission request, as the web app’s card does. Owners and admins only; the answer is recorded and the Session continues.
curl --request POST \
--url https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny', 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}/deny",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/deny")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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": "missing_bearer",
"message": "Authorization required"
}{}{
"error": "session_not_found"
}{}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}{}network_hosts or permission_rules request, as the web app’s card does: owners and admins only, the answer is recorded on the request, and the Session that asked continues. The change is the one the request’s signed receipt names, read on the server; nothing in the call chooses another. Calling it again on a request that already ended this way returns the request; a request that ended another way is refused with 409 input_request_not_pending. Returns the request as getSessionInputRequest reads it afterwards.
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
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 
