curl --request POST \
--url https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authoring_model_ref": "<string>",
"operation_id": "<string>",
"source": {
"kind": "blank"
},
"message": "<string>"
}
'import requests
url = "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts"
payload = {
"authoring_model_ref": "<string>",
"operation_id": "<string>",
"source": { "kind": "blank" },
"message": "<string>"
}
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({
authoring_model_ref: '<string>',
operation_id: '<string>',
source: {kind: 'blank'},
message: '<string>'
})
};
fetch('https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts', 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.agentsfleet.net/v1/workspaces/{workspace_id}/drafts",
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([
'authoring_model_ref' => '<string>',
'operation_id' => '<string>',
'source' => [
'kind' => 'blank'
],
'message' => '<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.agentsfleet.net/v1/workspaces/{workspace_id}/drafts"
payload := strings.NewReader("{\n \"authoring_model_ref\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"source\": {\n \"kind\": \"blank\"\n },\n \"message\": \"<string>\"\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.agentsfleet.net/v1/workspaces/{workspace_id}/drafts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"authoring_model_ref\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"source\": {\n \"kind\": \"blank\"\n },\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts")
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 \"authoring_model_ref\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"source\": {\n \"kind\": \"blank\"\n },\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"authoring_model_ref": "<string>",
"cancelled_through": "<string>",
"etag": "<string>",
"id": "<string>",
"state": "<string>",
"title": "<string>",
"candidate": {
"canonical_digest": "<string>",
"definition": {
"config": {
"name": "<string>",
"x-agentsfleet": {
"budget": {
"daily_nanos": "<string>",
"monthly_nanos": "<string>"
},
"tools": [
"<string>"
],
"context": {
"context_cap_tokens": 1,
"memory_checkpoint_every": 1,
"stage_chunk_threshold": 0.5,
"tool_window": 1
},
"credentials": [
"<string>"
],
"gates": {
"anomaly_rules": [
{
"pattern": "same_action",
"threshold_count": 5000,
"threshold_window_s": 43200
}
],
"rules": [
{
"action": "<string>",
"tool": "<string>",
"behavior": "approve",
"blast_radius": "<string>",
"condition": "<string>",
"gate_kind": "<string>"
}
],
"timeout_ms": 123
},
"model": "<string>",
"network": {
"allow": [
"<string>"
],
"read_only": true,
"read_post_paths": [
"<string>"
]
},
"repositories": [
"<string>"
],
"repository_access": "read",
"repository_base": "<string>",
"triggers": [
{
"source": "<string>",
"type": "webhook",
"credential_name": "<string>",
"events": [
"<string>"
],
"repositories": [
"<string>"
],
"signature": {
"secret_ref": "<string>"
}
}
]
}
},
"description": "<string>",
"instructions_md": "<string>",
"schema_version": 1
},
"id": "<string>",
"policy_semantics": "<string>",
"revision": "<string>"
},
"closed_at": 123,
"expires_at": 123,
"linked_fleet_id": "<string>",
"publication": {
"canonical_digest": "<string>",
"library_id": "<string>",
"revision_id": "<string>"
},
"review": {},
"accepted": {
"replayed": true,
"sequence": "<string>",
"status": "<string>"
}
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}Start a private workspace conversation
Requires fleet:write. Use only body operation_id; Idempotency-Key is refused. Native sources pin their immutable revisions.
curl --request POST \
--url https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authoring_model_ref": "<string>",
"operation_id": "<string>",
"source": {
"kind": "blank"
},
"message": "<string>"
}
'import requests
url = "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts"
payload = {
"authoring_model_ref": "<string>",
"operation_id": "<string>",
"source": { "kind": "blank" },
"message": "<string>"
}
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({
authoring_model_ref: '<string>',
operation_id: '<string>',
source: {kind: 'blank'},
message: '<string>'
})
};
fetch('https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts', 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.agentsfleet.net/v1/workspaces/{workspace_id}/drafts",
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([
'authoring_model_ref' => '<string>',
'operation_id' => '<string>',
'source' => [
'kind' => 'blank'
],
'message' => '<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.agentsfleet.net/v1/workspaces/{workspace_id}/drafts"
payload := strings.NewReader("{\n \"authoring_model_ref\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"source\": {\n \"kind\": \"blank\"\n },\n \"message\": \"<string>\"\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.agentsfleet.net/v1/workspaces/{workspace_id}/drafts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"authoring_model_ref\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"source\": {\n \"kind\": \"blank\"\n },\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/drafts")
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 \"authoring_model_ref\": \"<string>\",\n \"operation_id\": \"<string>\",\n \"source\": {\n \"kind\": \"blank\"\n },\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"authoring_model_ref": "<string>",
"cancelled_through": "<string>",
"etag": "<string>",
"id": "<string>",
"state": "<string>",
"title": "<string>",
"candidate": {
"canonical_digest": "<string>",
"definition": {
"config": {
"name": "<string>",
"x-agentsfleet": {
"budget": {
"daily_nanos": "<string>",
"monthly_nanos": "<string>"
},
"tools": [
"<string>"
],
"context": {
"context_cap_tokens": 1,
"memory_checkpoint_every": 1,
"stage_chunk_threshold": 0.5,
"tool_window": 1
},
"credentials": [
"<string>"
],
"gates": {
"anomaly_rules": [
{
"pattern": "same_action",
"threshold_count": 5000,
"threshold_window_s": 43200
}
],
"rules": [
{
"action": "<string>",
"tool": "<string>",
"behavior": "approve",
"blast_radius": "<string>",
"condition": "<string>",
"gate_kind": "<string>"
}
],
"timeout_ms": 123
},
"model": "<string>",
"network": {
"allow": [
"<string>"
],
"read_only": true,
"read_post_paths": [
"<string>"
]
},
"repositories": [
"<string>"
],
"repository_access": "read",
"repository_base": "<string>",
"triggers": [
{
"source": "<string>",
"type": "webhook",
"credential_name": "<string>",
"events": [
"<string>"
],
"repositories": [
"<string>"
],
"signature": {
"secret_ref": "<string>"
}
}
]
}
},
"description": "<string>",
"instructions_md": "<string>",
"schema_version": 1
},
"id": "<string>",
"policy_semantics": "<string>",
"revision": "<string>"
},
"closed_at": 123,
"expires_at": 123,
"linked_fleet_id": "<string>",
"publication": {
"canonical_digest": "<string>",
"library_id": "<string>",
"revision_id": "<string>"
},
"review": {},
"accepted": {
"replayed": true,
"sequence": "<string>",
"status": "<string>"
}
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}Authorizations
Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub OAuth
Path Parameters
UUIDv7 of the workspace.
Body
Atomically create a private draft and optional first message.
Explicit workspace-owner model reference.
Required body UUIDv7 operation identity.
Exact native source to capture.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Optional initial user text; 1..32768 UTF-8 bytes when present.
Response
Created or exact replay
Atomic draft creation response.
Explicit model for future messages.
Decimal standing cancellation watermark.
Strong version for idle edits.
Private draft identity.
editing, saving or closed.
Human display title.
Latest accepted setup, absent before the first candidate.
Show child attributes
Show child attributes
Closing time in Unix milliseconds.
Private retention deadline in Unix milliseconds.
Related fleet, when this draft targets or created one.
Explicit publication receipt, never synthesized by Save.
Show child attributes
Show child attributes
Complete effective setup, immutable requirements and live readiness.
Present only when creation accepted an initial message.
Show child attributes
Show child attributes