Sets the fields sent and marks each as attorney-stated. version goes up when a field that steers the AI (case type, jurisdiction, theory, claims, what to prove, parties, dates or date range) actually changes. Returns the updated context. Requires owner or admin access to the case and an active plan (403 otherwise); not available to opposing counsel.
PATCH
/ai/cases/{caseId}/context
curl \
--request PATCH 'http://api.example.com/ai/cases/{caseId}/context' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"caseType": "string",
"jurisdiction": "string",
"theoryOfCase": "string",
"whatToProve": [
"string"
],
"legalClaims": [
{
"id": "string",
"claim": "string",
"statuteCitation": "string",
"elements": [
{
"id": "string",
"description": "string"
}
],
"source": "complaint"
}
],
"keyParties": [
{
"name": "string",
"aliases": [
"string"
],
"role": "petitioner",
"handles": [
"string"
],
"significance": "string"
}
],
"keyDates": [
{
"date": "2026-05-04T09:42:00Z",
"event": "string",
"significance": "string"
}
],
"relevantDateRange": {
"start": "2026-05-04T09:42:00Z",
"end": "2026-05-04T09:42:00Z"
},
"sourceDocuments": [
"string"
]
}'
Request examples
{
"caseType": "string",
"jurisdiction": "string",
"theoryOfCase": "string",
"whatToProve": [
"string"
],
"legalClaims": [
{
"id": "string",
"claim": "string",
"statuteCitation": "string",
"elements": [
{
"id": "string",
"description": "string"
}
],
"source": "complaint"
}
],
"keyParties": [
{
"name": "string",
"aliases": [
"string"
],
"role": "petitioner",
"handles": [
"string"
],
"significance": "string"
}
],
"keyDates": [
{
"date": "2026-05-04T09:42:00Z",
"event": "string",
"significance": "string"
}
],
"relevantDateRange": {
"start": "2026-05-04T09:42:00Z",
"end": "2026-05-04T09:42:00Z"
},
"sourceDocuments": [
"string"
]
}
Response examples (200)
{
"data": {
"_id": "65a1b2c3d4e5f6a7b8c9d0e1",
"case": "65a1b2c3d4e5f6a7b8c9d0e2",
"organization": "65a1b2c3d4e5f6a7b8c9d0e3",
"caseType": "custody",
"jurisdiction": "California",
"theoryOfCase": "string",
"legalClaims": [
{
"id": "string",
"claim": "string",
"statuteCitation": "string",
"elements": [
{
"id": "string",
"description": "string"
}
],
"source": "complaint"
}
],
"whatToProve": [
"string"
],
"keyParties": [
{
"name": "string",
"aliases": [
"string"
],
"role": "petitioner",
"handles": [
"string"
],
"significance": "string"
}
],
"keyDates": [
{
"date": "2026-05-04T09:42:00Z",
"event": "string",
"significance": "string"
}
],
"relevantDateRange": {
"start": "2026-05-04T09:42:00Z",
"end": "2026-05-04T09:42:00Z"
},
"sourceDocuments": [
"string"
],
"authoredBy": "65a1b2c3d4e5f6a7b8c9d0e4",
"confirmedByAttorney": false,
"fieldProvenance": {
"theoryOfCase": "attorney_stated"
},
"extractionModelVersion": "string",
"version": 2,
"createdAt": "2026-01-15T10:15:00.000Z",
"updatedAt": "2026-01-15T10:15:00.000Z"
},
"statusCode": 200,
"timestamp": "2026-01-15T10:15:00.000Z"
}