Skip to main content
POST
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"

Body

application/json
title
string
required
Required string length: 3 - 200
changes
object[]
required
Required array length: 1 - 20 elements
rationale
string
Maximum string length: 4000
issueKey
string

The id or key of the issue this draft fixes.

Required string length: 1 - 200
newCaseIds
string<uuid>[]

The test cases written for this problem.

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}$
goalId
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}$
Example:

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

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