curl --request POST \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"byte_size": 1,
"content": [],
"context": "example",
"data": "example",
"encrypted_content": "example",
"height": 1,
"id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"input": {
"key": "example"
},
"is_error": true,
"media_type": "example",
"name": "example-name",
"omitted_bytes": 1,
"payload": "example",
"provider": "example",
"provider_payload": "example",
"redacted": true,
"semantic_hint": "example",
"sha256": "example",
"signature": "example",
"source": {
"file_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "file"
},
"summary": [],
"text": "example",
"title": "example",
"tool_use_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "example",
"uri": "example",
"url": "https://example.com",
"url_expires_at": "2026-02-18T09:30:00.000Z",
"width": 1
}
],
"message": "example",
"referenced_session_ids": [
"example"
]
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send"
payload = {
"content": [
{
"byte_size": 1,
"content": [],
"context": "example",
"data": "example",
"encrypted_content": "example",
"height": 1,
"id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"input": { "key": "example" },
"is_error": True,
"media_type": "example",
"name": "example-name",
"omitted_bytes": 1,
"payload": "example",
"provider": "example",
"provider_payload": "example",
"redacted": True,
"semantic_hint": "example",
"sha256": "example",
"signature": "example",
"source": {
"file_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "file"
},
"summary": [],
"text": "example",
"title": "example",
"tool_use_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "example",
"uri": "example",
"url": "https://example.com",
"url_expires_at": "2026-02-18T09:30:00.000Z",
"width": 1
}
],
"message": "example",
"referenced_session_ids": ["example"]
}
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({
content: [
{
byte_size: 1,
content: [],
context: 'example',
data: 'example',
encrypted_content: 'example',
height: 1,
id: '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
input: {key: 'example'},
is_error: true,
media_type: 'example',
name: 'example-name',
omitted_bytes: 1,
payload: 'example',
provider: 'example',
provider_payload: 'example',
redacted: true,
semantic_hint: 'example',
sha256: 'example',
signature: 'example',
source: {file_id: '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d', type: 'file'},
summary: [],
text: 'example',
title: 'example',
tool_use_id: '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
type: 'example',
uri: 'example',
url: 'https://example.com',
url_expires_at: '2026-02-18T09:30:00.000Z',
width: 1
}
],
message: 'example',
referenced_session_ids: ['example']
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send', 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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send",
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([
'content' => [
[
'byte_size' => 1,
'content' => [
],
'context' => 'example',
'data' => 'example',
'encrypted_content' => 'example',
'height' => 1,
'id' => '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
'input' => [
'key' => 'example'
],
'is_error' => true,
'media_type' => 'example',
'name' => 'example-name',
'omitted_bytes' => 1,
'payload' => 'example',
'provider' => 'example',
'provider_payload' => 'example',
'redacted' => true,
'semantic_hint' => 'example',
'sha256' => 'example',
'signature' => 'example',
'source' => [
'file_id' => '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
'type' => 'file'
],
'summary' => [
],
'text' => 'example',
'title' => 'example',
'tool_use_id' => '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
'type' => 'example',
'uri' => 'example',
'url' => 'https://example.com',
'url_expires_at' => '2026-02-18T09:30:00.000Z',
'width' => 1
]
],
'message' => 'example',
'referenced_session_ids' => [
'example'
]
]),
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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send"
payload := strings.NewReader("{\n \"content\": [\n {\n \"byte_size\": 1,\n \"content\": [],\n \"context\": \"example\",\n \"data\": \"example\",\n \"encrypted_content\": \"example\",\n \"height\": 1,\n \"id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"input\": {\n \"key\": \"example\"\n },\n \"is_error\": true,\n \"media_type\": \"example\",\n \"name\": \"example-name\",\n \"omitted_bytes\": 1,\n \"payload\": \"example\",\n \"provider\": \"example\",\n \"provider_payload\": \"example\",\n \"redacted\": true,\n \"semantic_hint\": \"example\",\n \"sha256\": \"example\",\n \"signature\": \"example\",\n \"source\": {\n \"file_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"file\"\n },\n \"summary\": [],\n \"text\": \"example\",\n \"title\": \"example\",\n \"tool_use_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"example\",\n \"uri\": \"example\",\n \"url\": \"https://example.com\",\n \"url_expires_at\": \"2026-02-18T09:30:00.000Z\",\n \"width\": 1\n }\n ],\n \"message\": \"example\",\n \"referenced_session_ids\": [\n \"example\"\n ]\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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": [\n {\n \"byte_size\": 1,\n \"content\": [],\n \"context\": \"example\",\n \"data\": \"example\",\n \"encrypted_content\": \"example\",\n \"height\": 1,\n \"id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"input\": {\n \"key\": \"example\"\n },\n \"is_error\": true,\n \"media_type\": \"example\",\n \"name\": \"example-name\",\n \"omitted_bytes\": 1,\n \"payload\": \"example\",\n \"provider\": \"example\",\n \"provider_payload\": \"example\",\n \"redacted\": true,\n \"semantic_hint\": \"example\",\n \"sha256\": \"example\",\n \"signature\": \"example\",\n \"source\": {\n \"file_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"file\"\n },\n \"summary\": [],\n \"text\": \"example\",\n \"title\": \"example\",\n \"tool_use_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"example\",\n \"uri\": \"example\",\n \"url\": \"https://example.com\",\n \"url_expires_at\": \"2026-02-18T09:30:00.000Z\",\n \"width\": 1\n }\n ],\n \"message\": \"example\",\n \"referenced_session_ids\": [\n \"example\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send")
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 \"content\": [\n {\n \"byte_size\": 1,\n \"content\": [],\n \"context\": \"example\",\n \"data\": \"example\",\n \"encrypted_content\": \"example\",\n \"height\": 1,\n \"id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"input\": {\n \"key\": \"example\"\n },\n \"is_error\": true,\n \"media_type\": \"example\",\n \"name\": \"example-name\",\n \"omitted_bytes\": 1,\n \"payload\": \"example\",\n \"provider\": \"example\",\n \"provider_payload\": \"example\",\n \"redacted\": true,\n \"semantic_hint\": \"example\",\n \"sha256\": \"example\",\n \"signature\": \"example\",\n \"source\": {\n \"file_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"file\"\n },\n \"summary\": [],\n \"text\": \"example\",\n \"title\": \"example\",\n \"tool_use_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"example\",\n \"uri\": \"example\",\n \"url\": \"https://example.com\",\n \"url_expires_at\": \"2026-02-18T09:30:00.000Z\",\n \"width\": 1\n }\n ],\n \"message\": \"example\",\n \"referenced_session_ids\": [\n \"example\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"delivery_state": "stored",
"events_accepted": 1,
"ok": true
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "conflict",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "content_store_unavailable",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Interrupt a session and send a replacement instruction
Stops active work and durably accepts a replacement instruction in one ordered operation. The session starts a fresh turn automatically. A session started before replacement instructions were available still honors the interrupt and keeps the replacement for its next resume.
curl --request POST \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"byte_size": 1,
"content": [],
"context": "example",
"data": "example",
"encrypted_content": "example",
"height": 1,
"id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"input": {
"key": "example"
},
"is_error": true,
"media_type": "example",
"name": "example-name",
"omitted_bytes": 1,
"payload": "example",
"provider": "example",
"provider_payload": "example",
"redacted": true,
"semantic_hint": "example",
"sha256": "example",
"signature": "example",
"source": {
"file_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "file"
},
"summary": [],
"text": "example",
"title": "example",
"tool_use_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "example",
"uri": "example",
"url": "https://example.com",
"url_expires_at": "2026-02-18T09:30:00.000Z",
"width": 1
}
],
"message": "example",
"referenced_session_ids": [
"example"
]
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send"
payload = {
"content": [
{
"byte_size": 1,
"content": [],
"context": "example",
"data": "example",
"encrypted_content": "example",
"height": 1,
"id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"input": { "key": "example" },
"is_error": True,
"media_type": "example",
"name": "example-name",
"omitted_bytes": 1,
"payload": "example",
"provider": "example",
"provider_payload": "example",
"redacted": True,
"semantic_hint": "example",
"sha256": "example",
"signature": "example",
"source": {
"file_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "file"
},
"summary": [],
"text": "example",
"title": "example",
"tool_use_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"type": "example",
"uri": "example",
"url": "https://example.com",
"url_expires_at": "2026-02-18T09:30:00.000Z",
"width": 1
}
],
"message": "example",
"referenced_session_ids": ["example"]
}
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({
content: [
{
byte_size: 1,
content: [],
context: 'example',
data: 'example',
encrypted_content: 'example',
height: 1,
id: '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
input: {key: 'example'},
is_error: true,
media_type: 'example',
name: 'example-name',
omitted_bytes: 1,
payload: 'example',
provider: 'example',
provider_payload: 'example',
redacted: true,
semantic_hint: 'example',
sha256: 'example',
signature: 'example',
source: {file_id: '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d', type: 'file'},
summary: [],
text: 'example',
title: 'example',
tool_use_id: '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
type: 'example',
uri: 'example',
url: 'https://example.com',
url_expires_at: '2026-02-18T09:30:00.000Z',
width: 1
}
],
message: 'example',
referenced_session_ids: ['example']
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send', 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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send",
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([
'content' => [
[
'byte_size' => 1,
'content' => [
],
'context' => 'example',
'data' => 'example',
'encrypted_content' => 'example',
'height' => 1,
'id' => '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
'input' => [
'key' => 'example'
],
'is_error' => true,
'media_type' => 'example',
'name' => 'example-name',
'omitted_bytes' => 1,
'payload' => 'example',
'provider' => 'example',
'provider_payload' => 'example',
'redacted' => true,
'semantic_hint' => 'example',
'sha256' => 'example',
'signature' => 'example',
'source' => [
'file_id' => '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
'type' => 'file'
],
'summary' => [
],
'text' => 'example',
'title' => 'example',
'tool_use_id' => '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d',
'type' => 'example',
'uri' => 'example',
'url' => 'https://example.com',
'url_expires_at' => '2026-02-18T09:30:00.000Z',
'width' => 1
]
],
'message' => 'example',
'referenced_session_ids' => [
'example'
]
]),
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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send"
payload := strings.NewReader("{\n \"content\": [\n {\n \"byte_size\": 1,\n \"content\": [],\n \"context\": \"example\",\n \"data\": \"example\",\n \"encrypted_content\": \"example\",\n \"height\": 1,\n \"id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"input\": {\n \"key\": \"example\"\n },\n \"is_error\": true,\n \"media_type\": \"example\",\n \"name\": \"example-name\",\n \"omitted_bytes\": 1,\n \"payload\": \"example\",\n \"provider\": \"example\",\n \"provider_payload\": \"example\",\n \"redacted\": true,\n \"semantic_hint\": \"example\",\n \"sha256\": \"example\",\n \"signature\": \"example\",\n \"source\": {\n \"file_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"file\"\n },\n \"summary\": [],\n \"text\": \"example\",\n \"title\": \"example\",\n \"tool_use_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"example\",\n \"uri\": \"example\",\n \"url\": \"https://example.com\",\n \"url_expires_at\": \"2026-02-18T09:30:00.000Z\",\n \"width\": 1\n }\n ],\n \"message\": \"example\",\n \"referenced_session_ids\": [\n \"example\"\n ]\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.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": [\n {\n \"byte_size\": 1,\n \"content\": [],\n \"context\": \"example\",\n \"data\": \"example\",\n \"encrypted_content\": \"example\",\n \"height\": 1,\n \"id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"input\": {\n \"key\": \"example\"\n },\n \"is_error\": true,\n \"media_type\": \"example\",\n \"name\": \"example-name\",\n \"omitted_bytes\": 1,\n \"payload\": \"example\",\n \"provider\": \"example\",\n \"provider_payload\": \"example\",\n \"redacted\": true,\n \"semantic_hint\": \"example\",\n \"sha256\": \"example\",\n \"signature\": \"example\",\n \"source\": {\n \"file_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"file\"\n },\n \"summary\": [],\n \"text\": \"example\",\n \"title\": \"example\",\n \"tool_use_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"example\",\n \"uri\": \"example\",\n \"url\": \"https://example.com\",\n \"url_expires_at\": \"2026-02-18T09:30:00.000Z\",\n \"width\": 1\n }\n ],\n \"message\": \"example\",\n \"referenced_session_ids\": [\n \"example\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{session_id}/interrupt-and-send")
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 \"content\": [\n {\n \"byte_size\": 1,\n \"content\": [],\n \"context\": \"example\",\n \"data\": \"example\",\n \"encrypted_content\": \"example\",\n \"height\": 1,\n \"id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"input\": {\n \"key\": \"example\"\n },\n \"is_error\": true,\n \"media_type\": \"example\",\n \"name\": \"example-name\",\n \"omitted_bytes\": 1,\n \"payload\": \"example\",\n \"provider\": \"example\",\n \"provider_payload\": \"example\",\n \"redacted\": true,\n \"semantic_hint\": \"example\",\n \"sha256\": \"example\",\n \"signature\": \"example\",\n \"source\": {\n \"file_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"file\"\n },\n \"summary\": [],\n \"text\": \"example\",\n \"title\": \"example\",\n \"tool_use_id\": \"9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d\",\n \"type\": \"example\",\n \"uri\": \"example\",\n \"url\": \"https://example.com\",\n \"url_expires_at\": \"2026-02-18T09:30:00.000Z\",\n \"width\": 1\n }\n ],\n \"message\": \"example\",\n \"referenced_session_ids\": [\n \"example\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"delivery_state": "stored",
"events_accepted": 1,
"ok": true
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "conflict",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "content_store_unavailable",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Authorizations
A Recursion API key, created in the console under API keys.
Path Parameters
Session id (UUID) as returned by startSession or listSessions.
Body
Request body for interrupting the active operation and starting a fresh turn with one replacement instruction.
Provider-shaped replacement instruction blocks, passed through verbatim, except that a top-level image or document block may name a file from the organization's catalog with source {type: file, file_id}, resolved exactly as on sendSessionEvents; a refusal names the block as content[j]. Takes precedence over message.
Show child attributes
Show child attributes
Replacement instruction for the fresh turn. Ignored when content is present.
Prior sessions this session may read from the fresh turn on, by session id, added to any it already has. Authorized and recorded before the interrupt is signaled, so redirecting the agent at an earlier run is one request rather than two.
10Response
Shared response body of POST /v1/sessions/{session_id}/events and POST /v1/sessions/{session_id}/interrupt-and-send. It acknowledges durable acceptance of the turn, never the agent's reply: read the reply by listing events or streaming. Compare events_accepted against what was sent to detect silently dropped entries, and read delivery_state to learn whether an agent is actually going to act on them. events_accepted counts canonical events rather than requests, so interrupt-and-send reports 2 for its single instruction: the stop and the message that follows it.
Shared response body of POST /v1/sessions/{session_id}/events and POST /v1/sessions/{session_id}/interrupt-and-send. It acknowledges durable acceptance of the turn, never the agent's reply: read the reply by listing events or streaming. Compare events_accepted against what was sent to detect silently dropped entries, and read delivery_state to learn whether an agent is actually going to act on them. events_accepted counts canonical events rather than requests, so interrupt-and-send reports 2 for its single instruction: the stop and the message that follows it.
How the accepted events reached a reader. queued: the agent was mid-turn, so the input is waiting outside the transcript and the next turn boundary will read it; interrupt to bring that forward. signaled: the running session was woken and will act on them. resumed: the session had already finished, so it resumed to act on them. stored: appended to the timeline with nothing running to act on them yet.
stored, signaled, resumed, queued How many canonical events were written or queued. This counts the inputs actually derived from the body, not its length: a plain message body yields 1, and a typed event with an unrecognised type or no content is dropped, so this can be lower than the events array sent.
Always true. Every event in the request was durably accepted; any partial or total failure is an HTTP error instead, so this field never reports false.