curl --request POST \
--url https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "sk_live_...",
"keep_private": false
}
'import requests
url = "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret"
payload = {
"value": "sk_live_...",
"keep_private": False
}
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({value: 'sk_live_...', keep_private: false})
};
fetch('https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret', 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}/secret",
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([
'value' => 'sk_live_...',
'keep_private' => false
]),
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}/secret"
payload := strings.NewReader("{\n \"value\": \"sk_live_...\",\n \"keep_private\": false\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}/secret")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"sk_live_...\",\n \"keep_private\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret")
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 \"value\": \"sk_live_...\",\n \"keep_private\": false\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": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": "last_owner"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}Provide a secret request's value
Answers a pending secret request with its value, as the request’s card in the web app does, and continues the Session waiting on it.
curl --request POST \
--url https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "sk_live_...",
"keep_private": false
}
'import requests
url = "https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret"
payload = {
"value": "sk_live_...",
"keep_private": False
}
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({value: 'sk_live_...', keep_private: false})
};
fetch('https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret', 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}/secret",
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([
'value' => 'sk_live_...',
'keep_private' => false
]),
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}/secret"
payload := strings.NewReader("{\n \"value\": \"sk_live_...\",\n \"keep_private\": false\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}/secret")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"sk_live_...\",\n \"keep_private\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reason.bot/v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret")
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 \"value\": \"sk_live_...\",\n \"keep_private\": false\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": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": "last_owner"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}for_user_id) may provide it. Requires secrets:write.
Where the value is stored follows the request: with secret_request.broker_hosts, as a workspace secret used only with those hosts; otherwise, when secret_request.reason_id is set, on that Reason, for everyone who uses it (its owner and managers save it), or, on a team Reason (secret_request.reason_team), kept private to you with keep_private: true (only your own messages to the Reason use it); otherwise as a workspace secret. A workspace secret needs a workspace owner or admin. The value is trimmed, must start with secret_request.value_prefix when one is set, and is never returned, logged or shown in the Session.
The Session continues once every secret its turn asked for is stored; until then the request stays pending. Retrying is safe: a retry’s value and keep_private are checked like a first call’s, but while a value that answers the request is already stored (a replace request counts only one stored after it was asked), nothing is written again and the sent value is not used; once the request is completed with its value stored, the request is returned unchanged. A moved_past request (someone wrote in the Session since it) still takes its value and continues the Session. A request settled any other way returns 409 input_request_not_pending.
Scope: secrets:writeAuthorizations
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 value was provided: completed once the Session continued, pending while it waits for more of its turn's secrets.
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 
