Skip to main content
POST
/
legal
/
v1
/
draft
curl -X POST "https://api.case.dev/legal/v1/draft" \ -H "Authorization: Bearer $CASEDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instructions": "<string>", "vault_id": "<string>" }'
{
  "run_id": "<string>",
  "agent_id": "<string>",
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Body

application/json

Structured drafting parameters

instructions
string
required

What to draft — the core task. E.g., "Motion to compel defendant to produce discovery responses"

Required string length: 10 - 50000
vault_id
string
required

Vault ID where the final document will be uploaded

output_type
enum<string>
default:md

Output file format

Available options:
pdf,
docx,
xlsx,
pptx,
md
output_name
string | null

Filename for the output document. Auto-generated if omitted.

length
object

Target document length

citations
boolean
default:false

Research and include legal citations

format
string | null

Court or jurisdiction formatting hint. Triggers a legal-skills search. E.g., "California Superior Court", "SDNY", "federal pleading"

verified
boolean
default:false

Verify all citations in a loop — re-run verification and repair bad citations until they pass

object_ids
string[] | null

Vault object IDs to use as source/reference documents

model
string | null

LLM model override. Defaults to anthropic/claude-sonnet-4.6

Response

Draft run started

run_id
string

Run ID — poll /agent/v1/run/:id/status for progress

agent_id
string

Ephemeral agent ID

status
enum<string>
Available options:
running
message
string