Skip to content

Create a case manually

Request

Manually create a case from a list of previously uploaded files. Each file in the request must be accompanied by a type indicating the role the file plays in the case (e.g. main document, attachment).

This is the manual case creation path, intended for API clients that determine case composition directly, as opposed to the AI-driven case creation triggered by POST /cases/process-file-batch.

This is an asynchronous operation. A successful response confirms that the request has been accepted and returns the identifier of the case being created. The case will be processed in the background.

The projectId in the request body is the identifier of the project in which the case will be created.

Security
OAuth2(Required scopes: cases.write)
Bodyapplication/jsonrequired

Payload for creating a case

filesArray of objects, non-empty(CaseFile)required

List of files to include in the case, each with their assigned role.

projectIdstringrequired

Identifier of the project in which the case will be created.

Example:"69bbd1e18cab258833c9ecf8"
externalIdstring

External identifier of the case. Can be used to link the case with an identifier in your system.

Example:"case-0001"
externalDataobject(ExternalData)

Associated external data. Will be applied to the case or to all cases in a batch. Provided as a flat JSON object. The properties are case-insensitive. The maximum amount of properties is limited to 20.

curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/cases/create \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "files": [
      {
        "id": "92b5be52-ce1e-4c74-b1ba-b6897c5d447a",
        "type": "invoice",
        "mainFile": true,
        "passthroughArtifact": false
      },
      {
        "id": "76bf4146-3ab2-4a8b-8c93-081f1de780b7",
        "type": "attachment",
        "mainFile": false,
        "passthroughArtifact": true
      }
    ],
    "projectId": "69bbd13093eba3eee76f3918"
  }'

Responses

Case creation request accepted. The case will be created asynchronously.

Bodyapplication/json
caseIdstringrequired

Identifier of the case being created. Can be used to retrieve the case via GET /cases/{id} once processing is complete.

Example:"8512a5dd-91b9-4363-a869-db17394a955d"
projectIdstringrequired

Identifier of the project in which the case is being created.

Example:"69bbd20e5c155a70e763bc8d"
Response
{ "caseId": "8512a5dd-91b9-4363-a869-db17394a955d", "projectId": "69bbd20e5c155a70e763bc8d" }