curl --request POST \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema_version": 1,
"source": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_key": "<string>",
"sha256": "<string>",
"title": "<string>",
"cli_version": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z"
},
"events": [
{
"kind": "message",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"losses": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import"
payload = {
"schema_version": 1,
"source": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_key": "<string>",
"sha256": "<string>",
"title": "<string>",
"cli_version": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z"
},
"events": [
{
"kind": "message",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"losses": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
schema_version: 1,
source: {
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_key: '<string>',
sha256: '<string>',
title: '<string>',
cli_version: '<string>',
last_activity_at: '2023-11-07T05:31:56Z'
},
events: [{kind: 'message', text: '<string>', timestamp: '2023-11-07T05:31:56Z'}],
losses: {},
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import', 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}/sessions/import",
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([
'schema_version' => 1,
'source' => [
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_key' => '<string>',
'sha256' => '<string>',
'title' => '<string>',
'cli_version' => '<string>',
'last_activity_at' => '2023-11-07T05:31:56Z'
],
'events' => [
[
'kind' => 'message',
'text' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z'
]
],
'losses' => [
],
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/sessions/import"
payload := strings.NewReader("{\n \"schema_version\": 1,\n \"source\": {\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_key\": \"<string>\",\n \"sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"cli_version\": \"<string>\",\n \"last_activity_at\": \"2023-11-07T05:31:56Z\"\n },\n \"events\": [\n {\n \"kind\": \"message\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"losses\": {},\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.reasonmachines.com/v3/organizations/{orgId}/sessions/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema_version\": 1,\n \"source\": {\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_key\": \"<string>\",\n \"sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"cli_version\": \"<string>\",\n \"last_activity_at\": \"2023-11-07T05:31:56Z\"\n },\n \"events\": [\n {\n \"kind\": \"message\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"losses\": {},\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import")
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 \"schema_version\": 1,\n \"source\": {\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_key\": \"<string>\",\n \"sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"cli_version\": \"<string>\",\n \"last_activity_at\": \"2023-11-07T05:31:56Z\"\n },\n \"events\": [\n {\n \"kind\": \"message\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"losses\": {},\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "imported",
"url": "<string>"
}{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "imported",
"url": "<string>"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}Import one externally authored coding-agent conversation without executing it
Optional project_id assigns the imported Session to an existing accessible Project. The Project is not created by this operation; archived or inaccessible Projects cannot receive new imports. Historical tools remain inert. A repeated import does not move an existing Session to a different Project.
Scope:runcurl --request POST \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema_version": 1,
"source": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_key": "<string>",
"sha256": "<string>",
"title": "<string>",
"cli_version": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z"
},
"events": [
{
"kind": "message",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"losses": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import"
payload = {
"schema_version": 1,
"source": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_key": "<string>",
"sha256": "<string>",
"title": "<string>",
"cli_version": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z"
},
"events": [
{
"kind": "message",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"losses": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
schema_version: 1,
source: {
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_key: '<string>',
sha256: '<string>',
title: '<string>',
cli_version: '<string>',
last_activity_at: '2023-11-07T05:31:56Z'
},
events: [{kind: 'message', text: '<string>', timestamp: '2023-11-07T05:31:56Z'}],
losses: {},
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import', 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}/sessions/import",
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([
'schema_version' => 1,
'source' => [
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_key' => '<string>',
'sha256' => '<string>',
'title' => '<string>',
'cli_version' => '<string>',
'last_activity_at' => '2023-11-07T05:31:56Z'
],
'events' => [
[
'kind' => 'message',
'text' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z'
]
],
'losses' => [
],
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/sessions/import"
payload := strings.NewReader("{\n \"schema_version\": 1,\n \"source\": {\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_key\": \"<string>\",\n \"sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"cli_version\": \"<string>\",\n \"last_activity_at\": \"2023-11-07T05:31:56Z\"\n },\n \"events\": [\n {\n \"kind\": \"message\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"losses\": {},\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.reasonmachines.com/v3/organizations/{orgId}/sessions/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema_version\": 1,\n \"source\": {\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_key\": \"<string>\",\n \"sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"cli_version\": \"<string>\",\n \"last_activity_at\": \"2023-11-07T05:31:56Z\"\n },\n \"events\": [\n {\n \"kind\": \"message\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"losses\": {},\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/import")
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 \"schema_version\": 1,\n \"source\": {\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_key\": \"<string>\",\n \"sha256\": \"<string>\",\n \"title\": \"<string>\",\n \"cli_version\": \"<string>\",\n \"last_activity_at\": \"2023-11-07T05:31:56Z\"\n },\n \"events\": [\n {\n \"kind\": \"message\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"losses\": {},\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "imported",
"url": "<string>"
}{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "imported",
"url": "<string>"
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"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: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.
Body
Show child attributes
Show child attributes
1 - 5000 elements- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Show child attributes
Show child attributes
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
Already imported from the same source revision.

