curl --request PUT \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"role_arn": "arn:aws:iam::123456789012:role/reason",
"region": "us-east-1"
},
"allowed_triggers": [
"manual",
"api",
"schedule"
]
}
'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}"
payload = {
"config": {
"role_arn": "arn:aws:iam::123456789012:role/reason",
"region": "us-east-1"
},
"allowed_triggers": ["manual", "api", "schedule"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {role_arn: 'arn:aws:iam::123456789012:role/reason', region: 'us-east-1'},
allowed_triggers: ['manual', 'api', 'schedule']
})
};
fetch('https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}', 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}/cloud-access/{provider}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'role_arn' => 'arn:aws:iam::123456789012:role/reason',
'region' => 'us-east-1'
],
'allowed_triggers' => [
'manual',
'api',
'schedule'
]
]),
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.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}"
payload := strings.NewReader("{\n \"config\": {\n \"role_arn\": \"arn:aws:iam::123456789012:role/reason\",\n \"region\": \"us-east-1\"\n },\n \"allowed_triggers\": [\n \"manual\",\n \"api\",\n \"schedule\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"role_arn\": \"arn:aws:iam::123456789012:role/reason\",\n \"region\": \"us-east-1\"\n },\n \"allowed_triggers\": [\n \"manual\",\n \"api\",\n \"schedule\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"role_arn\": \"arn:aws:iam::123456789012:role/reason\",\n \"region\": \"us-east-1\"\n },\n \"allowed_triggers\": [\n \"manual\",\n \"api\",\n \"schedule\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"provider": "aws",
"config": {
"role_arn": "arn:aws:iam::123456789012:role/reason",
"region": "us-east-1"
},
"enabled": true,
"allowed_triggers": [
"manual",
"api"
],
"updated_at": "2026-10-16T09:00:00Z",
"last_tested_at": "2026-10-16T09:01:00Z",
"last_test_ok": true,
"last_test_message": "arn:aws:sts::123456789012:assumed-role/reason/reason-connection-test",
"last_used_at": null
}{
"error": "prompt_required"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}Create or replace a cloud access connection
Saves the workspace’s one connection for a provider (aws, gcp or azure). Requires owner/admin. config is required and replaces the stored config; a changed config clears the last test. enabled and allowed_triggers keep their stored values when omitted; a new connection is enabled and allows manual and api. A connection signs in only runs whose trigger it allows: manual sessions started in the reason app; api sessions started with the api, the cli or by another session; schedule scheduled automations; github_event github mentions, issues and pull requests; webhook automation webhooks; slack slack mentions; linear linear issues.
org:writecurl --request PUT \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"role_arn": "arn:aws:iam::123456789012:role/reason",
"region": "us-east-1"
},
"allowed_triggers": [
"manual",
"api",
"schedule"
]
}
'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}"
payload = {
"config": {
"role_arn": "arn:aws:iam::123456789012:role/reason",
"region": "us-east-1"
},
"allowed_triggers": ["manual", "api", "schedule"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {role_arn: 'arn:aws:iam::123456789012:role/reason', region: 'us-east-1'},
allowed_triggers: ['manual', 'api', 'schedule']
})
};
fetch('https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}', 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}/cloud-access/{provider}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'role_arn' => 'arn:aws:iam::123456789012:role/reason',
'region' => 'us-east-1'
],
'allowed_triggers' => [
'manual',
'api',
'schedule'
]
]),
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.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}"
payload := strings.NewReader("{\n \"config\": {\n \"role_arn\": \"arn:aws:iam::123456789012:role/reason\",\n \"region\": \"us-east-1\"\n },\n \"allowed_triggers\": [\n \"manual\",\n \"api\",\n \"schedule\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"role_arn\": \"arn:aws:iam::123456789012:role/reason\",\n \"region\": \"us-east-1\"\n },\n \"allowed_triggers\": [\n \"manual\",\n \"api\",\n \"schedule\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/cloud-access/{provider}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"role_arn\": \"arn:aws:iam::123456789012:role/reason\",\n \"region\": \"us-east-1\"\n },\n \"allowed_triggers\": [\n \"manual\",\n \"api\",\n \"schedule\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"provider": "aws",
"config": {
"role_arn": "arn:aws:iam::123456789012:role/reason",
"region": "us-east-1"
},
"enabled": true,
"allowed_triggers": [
"manual",
"api"
],
"updated_at": "2026-10-16T09:00:00Z",
"last_tested_at": "2026-10-16T09:01:00Z",
"last_test_ok": true,
"last_test_message": "arn:aws:sts::123456789012:assumed-role/reason/reason-connection-test",
"last_used_at": null
}{
"error": "prompt_required"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}Authorizations
Your Reason API key from Settings > API. 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, knowledge:read, memory:read, memory:write, skills:read, skills: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, automations:read, automations:write, agent_auth:read. 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
Organization id or slug. Resolve it with GET /v3/self.
The cloud access provider.
aws, gcp, azure Body
Response
The saved connection.
aws, gcp, azure Provider identifiers: aws role_arn, region; gcp workload_identity_provider, service_account, project_id; azure tenant_id, client_id, subscription_id.
Run triggers this connection signs in.
manual, api, schedule, github_event, webhook, slack, linear 
