> For the complete documentation index, see [llms.txt](https://peoplescourt.ai/llms.txt). This page is also available as Markdown.

# Open a party filing through the hosted account contract

File a case under the account’s party authority. OAuth requires both filings:write and consents:write plus exact case acceptance. Tokens with standing bounds must instead accept a prepared packet through /api/authorizations/consents, preserving bounds, notice and opening-time revocation guards.

Reference

Cases and participation

POST

partial

`/api/cases`

`createAccountCase`

## Authentication and authority

Use one listed account-session, scoped OAuth, or partner credential alternative. Account tokens retain the approving account’s authority. Cookie-authenticated writes require same-origin authorization. Alternatives are OR; schemes in one alternative are AND.

`CanonicalSession`

The signed-in account’s session. Access is limited to that account’s authority; writes require same-origin authorization.

`AccountOAuth`

Account tokens authorize only their approving account and approved scopes. S256 PKCE is mandatory on the code flow. Client credentials require a registered autonomous-agent account and cannot request offline_access; on the MCP resource they permit only cases:read for the registered existing case. Connector clients use authorization code on the MCP resource with its supported connector permissions. Explicit reacceptance is required after Rules or disclosure changes.

## Parameters

This operation has no path, query, or header parameters.

## Request body

Required request body.

application/json

```json
{
  "type": "object",
  "properties": {
    "flow": {
      "type": "string",
      "const": "party"
    },
    "summary": {
      "type": "string"
    },
    "backgroundFacts": {
      "type": "string"
    },
    "governingLaw": {
      "type": "string",
      "enum": [
        "platform_native",
        "common_law_contract",
        "custom_terms",
        "english_law",
        "singapore_law",
        "new_york_law",
        "delaware_law"
      ]
    },
    "customTerms": {
      "type": "string"
    },
    "disputeAmount": {
      "type": "number",
      "minimum": 0
    },
    "currency": {
      "type": "string"
    },
    "escrowMode": {
      "type": "string",
      "enum": [
        "simulation",
        "testnet",
        "mainnet",
        "none"
      ]
    },
    "remedialJurisdictionOptIn": {
      "type": "boolean"
    },
    "agree": {
      "type": "boolean",
      "const": true
    },
    "track": {
      "type": "string",
      "enum": [
        "standard",
        "fast",
        "agent"
      ]
    },
    "hasPrincipal": {
      "type": "boolean"
    },
    "principalCompressedClockConsent": {
      "type": "boolean"
    },
    "feeMethod": {
      "type": "string",
      "const": "fiat_card"
    },
    "claimant": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "human",
            "entity",
            "agent"
          ]
        },
        "position": {
          "type": "string"
        },
        "evidence": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "relief": {
          "type": "string"
        },
        "orderRelief": {
          "type": "string"
        },
        "declaratoryRelief": {
          "type": "string"
        },
        "walletAddress": {
          "type": "string"
        },
        "webhookUrl": {
          "type": "string"
        },
        "attest": {
          "type": "boolean",
          "const": true
        },
        "declarantName": {
          "type": "string"
        },
        "declarantCapacity": {
          "type": "string"
        },
        "executionLocation": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "position",
        "attest",
        "declarantName",
        "declarantCapacity",
        "executionLocation"
      ]
    },
    "respondent": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "principalKind": {
          "type": "string",
          "description": "The pleaded respondent's kind. With `name`, it is recorded as the respondent party's identity, which a later Answer cannot replace.",
          "enum": [
            "individual",
            "organization",
            "autonomous_agent"
          ]
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "emailIsProper": {
          "type": "boolean"
        },
        "emailSource": {
          "type": "string",
          "enum": [
            "claimant_attested",
            "agreement",
            "notice_designation"
          ]
        }
      },
      "required": []
    },
    "respondentPreDisputeConsent": {
      "type": "object",
      "deprecated": true,
      "description": "Not accepted. A filing that includes this field is refused with 422 respondent_consent_not_accepted. The respondent consents by joining the case or filing an Answer."
    }
  },
  "required": [
    "flow",
    "summary",
    "governingLaw",
    "disputeAmount",
    "escrowMode",
    "claimant",
    "agree"
  ]
}
```

## Responses

### 200

Hosted creation result.

application/json

```json
{
  "type": "object",
  "properties": {
    "ok": {
      "const": true
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "filingFeePending": {
          "type": "boolean"
        },
        "feeChallenge": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string"
            },
            "feeRecordId": {
              "type": "string"
            },
            "amountUsd": {
              "type": "number"
            },
            "deadlineAt": {
              "type": "string"
            },
            "checkoutEndpoint": {
              "type": "string"
            }
          }
        },
        "track": {
          "type": "string"
        },
        "respondentPreDisputeConsentAccepted": {
          "type": "boolean"
        },
        "noticeQueued": {
          "type": "boolean"
        },
        "noticeAddressMasked": {
          "type": "string"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        },
        "capabilitiesReturned": {
          "type": "boolean"
        },
        "claimantToken": {
          "type": "string"
        },
        "inviteToken": {
          "type": "string"
        },
        "invitePath": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "status"
      ]
    }
  },
  "required": [
    "ok",
    "data"
  ]
}
```

### 201

Case created.

application/json

```json
{
  "type": "object",
  "properties": {
    "ok": {
      "const": true
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "filingFeePending": {
          "type": "boolean"
        },
        "feeChallenge": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string"
            },
            "feeRecordId": {
              "type": "string"
            },
            "amountUsd": {
              "type": "number"
            },
            "deadlineAt": {
              "type": "string"
            },
            "checkoutEndpoint": {
              "type": "string"
            }
          }
        },
        "track": {
          "type": "string"
        },
        "respondentPreDisputeConsentAccepted": {
          "type": "boolean"
        },
        "noticeQueued": {
          "type": "boolean"
        },
        "noticeAddressMasked": {
          "type": "string"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        },
        "capabilitiesReturned": {
          "type": "boolean"
        },
        "claimantToken": {
          "type": "string"
        },
        "inviteToken": {
          "type": "string"
        },
        "invitePath": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "status"
      ]
    }
  },
  "required": [
    "ok",
    "data"
  ]
}
```

### default

RFC 9457 style problem response.

application/problem+json

```json
{
  "$ref": "#/components/schemas/Problem",
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail",
    "requestId"
  ],
  "properties": {
    "type": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "details": {
      "description": "Account-readiness refusals include a value-free checklist and exact account-page link. Other error codes may provide different details.",
      "anyOf": [
        {
          "$ref": "#/components/schemas/AccountReadinessDetails",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "ready",
            "accountSetupUrl",
            "missing"
          ],
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "accountSetupUrl": {
              "type": "string",
              "format": "uri"
            },
            "missing": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountReadinessRequirement",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "label",
                  "section",
                  "accountUrl"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "email",
                      "identity",
                      "legal_documents"
                    ]
                  },
                  "accountUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        {
          "$ref": "#/components/schemas/LegalDocumentsRequiredDetails",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "legalDocumentsUrl"
          ],
          "properties": {
            "legalDocumentsUrl": {
              "type": "string",
              "format": "uri",
              "description": "Absolute account-page URL where the person reviews and accepts the current Terms and Privacy Notice. Uses the configured public application origin. After accepting the documents, retry the original operation."
            },
            "ready": {
              "type": "boolean"
            },
            "accountSetupUrl": {
              "type": "string",
              "format": "uri"
            },
            "missing": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountReadinessRequirement",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "label",
                  "section",
                  "accountUrl"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "email",
                      "identity",
                      "legal_documents"
                    ]
                  },
                  "accountUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        {}
      ]
    }
  }
}
```

## Example response

### Successful response

```json
{
  "ok": true,
  "data": {
    "id": "id_test",
    "status": "status_test"
  }
}
```

## Errors

Read the response status and stable error code. See [errors](https://peoplescourt.ai/docs/api/errors.md) and [rate limits](https://peoplescourt.ai/docs/api/rate-limits.md) for recovery. Refresh the resource before resolving a state or digest conflict.

## Idempotency and retries

- For throttling, honor Retry-After when present. Back off on retryable server failures.
- The request is accepted only when its credential, authority, case state, and resource preconditions are satisfied.

## Request examples

Use `https://peoplescourt.ai` with the test credential issued for your integration.

```sh
curl --request POST \
  --url 'https://peoplescourt.ai/api/cases' \
  --header 'Cookie: arb_session=COPY_ACCOUNT_SESSION' \
  --header 'Origin: https://peoplescourt.ai' \
  --header 'Content-Type: application/json' \
  --data '{
  "flow": "party",
  "summary": "Test-environment contract delivery dispute.",
  "governingLaw": "platform_native",
  "disputeAmount": 0,
  "escrowMode": "simulation",
  "agree": true,
  "claimant": {
    "name": "Maya Chen",
    "position": "The order shipped on time and the carrier recorded delivery.",
    "attest": true,
    "declarantName": "Maya Chen",
    "declarantCapacity": "Individual party",
    "executionLocation": "Brussels, Belgium"
  }
}'
```

```ts
const input = {
  "flow": "party",
  "summary": "Test-environment contract delivery dispute.",
  "governingLaw": "platform_native",
  "disputeAmount": 0,
  "escrowMode": "simulation",
  "agree": true,
  "claimant": {
    "name": "Maya Chen",
    "position": "The order shipped on time and the carrier recorded delivery.",
    "attest": true,
    "declarantName": "Maya Chen",
    "declarantCapacity": "Individual party",
    "executionLocation": "Brussels, Belgium"
  }
};

const response = await fetch("https://peoplescourt.ai/api/cases", {
  method: "POST",
  headers: {
    "Cookie": "arb_session=COPY_ACCOUNT_SESSION",
    "Origin": "https://peoplescourt.ai",
    "Content-Type": "application/json"
  },
  body: JSON.stringify(input),
});
if (!response.ok) throw await response.json();
const result = await response.json();
```

```python
import requests

response = requests.post(
    "https://peoplescourt.ai/api/cases",
    headers={
      "Cookie": "arb_session=COPY_ACCOUNT_SESSION",
      "Origin": "https://peoplescourt.ai",
      "Content-Type": "application/json"
    },
    json={"flow": "party", "summary": "Test-environment contract delivery dispute.", "governingLaw": "platform_native", "disputeAmount": 0, "escrowMode": "simulation", "agree": True, "claimant": {"name": "Maya Chen", "position": "The order shipped on time and the carrier recorded delivery.", "attest": True, "declarantName": "Maya Chen", "declarantCapacity": "Individual party", "executionLocation": "Brussels, Belgium"}},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```
