Skip to main content

Create Case

Creates a new case for organizing files, analyses, and results related to a crash or legal matter.

Parameters

ParameterTypeRequiredDescription
namestringYesDescriptive name for the case
clientNamestringNoName of the client associated with this case
organizationIdstringNoID of the organization to associate this case with
info

Empty string organizationId values are treated as null (no organization).

Response

Returns the created case with:

  • id: Unique case identifier
  • name: Case name
  • clientName: Client name (if provided)
  • organizationId: Organization ID (if associated)
  • status: Case status (typically "active")
  • creatorId: ID of the API key or user that created the case
  • created: Creation timestamp (Unix seconds)
  • updated: Last modification timestamp (Unix seconds)

Examples

import (
"context"
"github.com/silentwitness/go-sdk"
)

// Basic case
response, err := silentwitness.Cases.Create(ctx, &silentwitness.CreateCaseRequest{
Name: "Smith v. Johnson",
})

// With client name
response, err := silentwitness.Cases.Create(ctx, &silentwitness.CreateCaseRequest{
Name: "Smith v. Johnson",
ClientName: silentwitness.String("Jane Smith"),
})

// With organization
orgID := "org_abc123"
response, err := silentwitness.Cases.Create(ctx, &silentwitness.CreateCaseRequest{
Name: "Smith v. Johnson",
ClientName: silentwitness.String("Jane Smith"),
OrganizationId: &orgID,
})

if err != nil {
log.Fatal(err)
}

fmt.Printf("Created: %s (ID: %s)\n", response.Case.Name, response.Case.Id)

Errors

CodeDescription
INVALID_ARGUMENTMissing required name field
UNAUTHENTICATEDInvalid or missing API key