curl --request PATCH \
--url https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"cloud_enabled": true,
"resources": [
{
"kind": "repository",
"scm_repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "context",
"access_mode": "read_write"
}
],
"source_folders": [
"<string>"
],
"preferred_dir": "<string>"
}
'import requests
url = "https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}"
payload = {
"name": "<string>",
"description": "<string>",
"cloud_enabled": True,
"resources": [
{
"kind": "repository",
"scm_repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "context",
"access_mode": "read_write"
}
],
"source_folders": ["<string>"],
"preferred_dir": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
cloud_enabled: true,
resources: [
{
kind: 'repository',
scm_repository_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
role: 'context',
access_mode: 'read_write'
}
],
source_folders: ['<string>'],
preferred_dir: '<string>'
})
};
fetch('https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}', 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.ai/v3/organizations/{orgId}/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'cloud_enabled' => true,
'resources' => [
[
'kind' => 'repository',
'scm_repository_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'role' => 'context',
'access_mode' => 'read_write'
]
],
'source_folders' => [
'<string>'
],
'preferred_dir' => '<string>'
]),
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.ai/v3/organizations/{orgId}/projects/{projectId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cloud_enabled\": true,\n \"resources\": [\n {\n \"kind\": \"repository\",\n \"scm_repository_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role\": \"context\",\n \"access_mode\": \"read_write\"\n }\n ],\n \"source_folders\": [\n \"<string>\"\n ],\n \"preferred_dir\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cloud_enabled\": true,\n \"resources\": [\n {\n \"kind\": \"repository\",\n \"scm_repository_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role\": \"context\",\n \"access_mode\": \"read_write\"\n }\n ],\n \"source_folders\": [\n \"<string>\"\n ],\n \"preferred_dir\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cloud_enabled\": true,\n \"resources\": [\n {\n \"kind\": \"repository\",\n \"scm_repository_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role\": \"context\",\n \"access_mode\": \"read_write\"\n }\n ],\n \"source_folders\": [\n \"<string>\"\n ],\n \"preferred_dir\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"kind": "local",
"cloud_enabled": true,
"visibility": "workspace",
"archived_at": "<string>",
"revision": 123,
"can_edit": true,
"resources": [
{
"id": "<string>",
"role": "primary",
"access_mode": "read_only",
"display_name": "<string>",
"status": "active",
"write_allowed": true,
"kind": "repository",
"scm_repository_id": "<string>",
"provider": "<string>",
"full_path": "<string>"
}
],
"project_document": {
"revision": 123,
"content": "<string>",
"content_hash": "<string>",
"byte_length": 1,
"created_at": "<string>"
}
}{
"error": "prompt_required"
}{
"error": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": "project_document_revision_conflict",
"current_revision": 123
}Update a project
Updates project settings or canonical instructions. Requires run and project management permission. Restore an archived project before editing. For instructions, send project_md.content with project_md.expected_revision from GET project_document.revision; stale revisions return 409 without overwriting newer instructions.
Scope:runcurl --request PATCH \
--url https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"cloud_enabled": true,
"resources": [
{
"kind": "repository",
"scm_repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "context",
"access_mode": "read_write"
}
],
"source_folders": [
"<string>"
],
"preferred_dir": "<string>"
}
'import requests
url = "https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}"
payload = {
"name": "<string>",
"description": "<string>",
"cloud_enabled": True,
"resources": [
{
"kind": "repository",
"scm_repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "context",
"access_mode": "read_write"
}
],
"source_folders": ["<string>"],
"preferred_dir": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
cloud_enabled: true,
resources: [
{
kind: 'repository',
scm_repository_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
role: 'context',
access_mode: 'read_write'
}
],
source_folders: ['<string>'],
preferred_dir: '<string>'
})
};
fetch('https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}', 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.ai/v3/organizations/{orgId}/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'cloud_enabled' => true,
'resources' => [
[
'kind' => 'repository',
'scm_repository_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'role' => 'context',
'access_mode' => 'read_write'
]
],
'source_folders' => [
'<string>'
],
'preferred_dir' => '<string>'
]),
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.ai/v3/organizations/{orgId}/projects/{projectId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cloud_enabled\": true,\n \"resources\": [\n {\n \"kind\": \"repository\",\n \"scm_repository_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role\": \"context\",\n \"access_mode\": \"read_write\"\n }\n ],\n \"source_folders\": [\n \"<string>\"\n ],\n \"preferred_dir\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cloud_enabled\": true,\n \"resources\": [\n {\n \"kind\": \"repository\",\n \"scm_repository_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role\": \"context\",\n \"access_mode\": \"read_write\"\n }\n ],\n \"source_folders\": [\n \"<string>\"\n ],\n \"preferred_dir\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.ai/v3/organizations/{orgId}/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"cloud_enabled\": true,\n \"resources\": [\n {\n \"kind\": \"repository\",\n \"scm_repository_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"role\": \"context\",\n \"access_mode\": \"read_write\"\n }\n ],\n \"source_folders\": [\n \"<string>\"\n ],\n \"preferred_dir\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"kind": "local",
"cloud_enabled": true,
"visibility": "workspace",
"archived_at": "<string>",
"revision": 123,
"can_edit": true,
"resources": [
{
"id": "<string>",
"role": "primary",
"access_mode": "read_only",
"display_name": "<string>",
"status": "active",
"write_allowed": true,
"kind": "repository",
"scm_repository_id": "<string>",
"provider": "<string>",
"full_path": "<string>"
}
],
"project_document": {
"revision": 123,
"content": "<string>",
"content_hash": "<string>",
"byte_length": 1,
"created_at": "<string>"
}
}{
"error": "prompt_required"
}{
"error": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": "project_document_revision_conflict",
"current_revision": 123
}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:debug is privileged: it expands diagnostic session events only for organization owners/admins.
Path Parameters
Organization id or slug. Resolve it with GET /v3/self.
The project id.
Body
Update a project. To replace instructions, send project_md.content and project_md.expected_revision from the current project_document.revision. A stale revision returns 409.
1 - 1202000workspace, private local, remote 100- Option 1
- Option 2
Show child attributes
Show child attributes
1001 - 40964096Show child attributes
Show child attributes
Response
Updated project and instructions.
Project metadata and current canonical instructions. Use project_document.revision for instruction updates; revision tracks project metadata separately.
Pass this id as project_id when creating or listing sessions.
local, remote Whether this Project permits the default cloud session target. When false, select a compatible Device target explicitly.
workspace, private - Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes

