Skip to main content
PATCH
curl

Authorizations

Authorization
string
header
required

An API key (sig_...), or a session token from the web app.

Path Parameters

agentId
string<uuid>
required

The agent's id.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

draftId
string<uuid>
required

The draft's id.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

Body

application/json
title
string
Required string length: 3 - 200
rationale
string
Maximum string length: 4000
changes
object[]
Required array length: 1 - 20 elements
newCaseIds
string<uuid>[]
Maximum array length: 50
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Response

The draft.

A draft, with its diff, its tests and why it can or cannot be published.

object
enum<string>
required
Available options:
draft
id
string<uuid>
required
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

agentId
string<uuid>
required
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

title
string
required
rationale
string
required
status
enum<string>
required
Available options:
draft,
testing,
publishing,
published,
discarded
baseVersion
integer
required
baseHash
string
required
draftHash
string
required

The content hash of the draft's text: what a publish must confirm.

revision
integer
required

Bumped by every change to the text: what a publish must confirm.

stale
boolean
required
canPublish
boolean
required
publishBlockedReason
string
newCaseIds
string<uuid>[]
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
suiteGate
object

Whether the whole accepted suite ran (and, for a key, passed) on this exact text.

{key}
any