curl --request POST \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}', 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.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}",
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.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}"
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.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}")
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{
"url": "<string>"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}Manage one connection
Run one action on a connection from listConnections: check, reconnect, cancel, remove or disconnect. An unsupported action returns 409.
curl --request POST \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}', 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.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}",
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.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}"
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.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/connections/{adapter}/{id}/{action}")
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{
"url": "<string>"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}check probes health, reconnect returns a consent URL, cancel removes pending MCP setup, remove and MCP disconnect act locally, and native disconnect revokes where supported. Requires management permission; an unsupported action returns 409.
check works for a catalog plugin and for a custom remote MCP server alike: Reason connects to the server’s url over streamable HTTP with its stored credentials, lists its tools and saves the result. A custom server is checked once its URL is approved, which an owner or admin does by registering it (createMcpServer or updateMcpServer: transport http, a public https URL, and no headers or the one Authorization header its auth_type takes). Every request Reason makes to it, redirects included, must resolve to a public internet address; a private, loopback or link-local address is never called. A probe that reaches the server returns { "ok": true, "status", "tool_names", ... }, with error_code and message when status is not healthy.
A check that cannot probe returns 200 with { "ok": false, "error": <code>, "message": <text> }; message names the next step. curated_http_only: a remote (http or sse) custom server whose URL was never approved, so every check and tool call fails; an owner or admin approves it by sending its url with updateMcpServer. oauth_required: an OAuth server with no usable sign-in; start one with startPluginSignIn or reconnect. credentials_unavailable: the installation cannot be resolved for a call (a catalog plugin whose saved configuration no longer matches its catalog entry, or a Reason connection that needs the caller’s own account). endpoint_unavailable: the URL is not https or its host does not resolve to a public address. curated_configuration_mismatch: the saved URL, headers or auth type no longer match the approval or catalog entry. mcp_server_disabled: enable it with updateMcpServer { "enabled": true }. A stdio server is not checked from Reason’s servers (409 connection_check_unsupported_transport); it runs inside a session’s computer.
OAuth for a custom MCP server: register it with createMcpServer and auth_type oauth (inspectMcpServerEndpoint reports what a URL takes before you add it), then reconnect here or startPluginSignIn returns the consent URL. Reason discovers the server’s authorization server and registers its own client when the server allows dynamic client registration; when it does not, the answer is 422 oauth_configuration_required with the redirect_uri to register your own OAuth client for, which you then pass as oauth_client to startPluginSignIn.
Scope: mcp: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
What to do with the connection: check tests its health and saves the result; reconnect returns a consent URL to sign in again; disconnect removes it and revokes the provider's authorization where the provider supports that; remove deletes it from Reason only; cancel abandons a pending MCP setup. listConnections shows which actions an account supports.
check, reconnect, disconnect, remove, cancel Response
Connection action result, or an OAuth consent URL. A check that could not probe is { ok: false, error, message }; curated_http_only marks a remote custom MCP server whose URL was never approved (an owner or admin approves it by sending its url with updateMcpServer).

