Skip to main content

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.

A project is a serverless PostgreSQL database with automatic scaling, backups, and connection pooling. Each project starts with a default main branch and neondb database.

Create a project

curl -X POST https://api.case.dev/database/v1/projects \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "litigation-docs-db",
    "description": "Production database for litigation documents",
    "region": "aws-us-east-1"
  }'

Parameters

ParameterTypeRequiredDescription
namestringYesProject name (letters, numbers, hyphens, underscores only)
descriptionstringNoOptional project description
regionstringNoAWS region (defaults to aws-us-east-1)

Response

FieldTypeDescription
idstringProject ID
namestringProject name
descriptionstringProject description
regionstringAWS region
pgVersionintegerPostgreSQL version (17)
statusstringactive, suspended, or deleted
defaultBranchobjectDefault branch info (id, name)
createdAtstringISO 8601 timestamp

List projects

curl https://api.case.dev/database/v1/projects \
  -H "Authorization: Bearer $CASEDEV_API_KEY"
Response
[
  {
    "id": "proj_abc123",
    "name": "case-management-prod",
    "description": "Production database",
    "region": "aws-us-east-1",
    "pgVersion": 17,
    "status": "active",
    "storageSizeBytes": 52428800,
    "computeTimeSeconds": 3600,
    "linkedDeployments": [
      {
        "id": "deploy_xyz",
        "type": "compute",
        "name": "Case Intake Portal",
        "envVarName": "DATABASE_URL"
      }
    ],
    "createdAt": "2025-01-10T08:00:00Z",
    "updatedAt": "2025-01-15T12:00:00Z"
  }
]

Get project details

curl https://api.case.dev/database/v1/projects/proj_abc123 \
  -H "Authorization: Bearer $CASEDEV_API_KEY"
Response
{
  "id": "proj_abc123",
  "name": "case-management-prod",
  "description": "Production database",
  "region": "aws-us-east-1",
  "pgVersion": 17,
  "status": "active",
  "storageSizeBytes": 52428800,
  "computeTimeSeconds": 3600,
  "connectionHostname": "ep-***-123456.us-east-1.aws.neon.tech",
  "branches": [
    {
      "id": "branch_main",
      "name": "main",
      "isDefault": true,
      "status": "active",
      "createdAt": "2025-01-10T08:00:00Z"
    },
    {
      "id": "branch_staging",
      "name": "staging",
      "isDefault": false,
      "parentBranchId": "branch_main",
      "status": "active",
      "createdAt": "2025-01-12T10:00:00Z"
    }
  ],
  "databases": [{ "name": "neondb", "ownerName": "neondb_owner" }],
  "linkedDeployments": [],
  "createdAt": "2025-01-10T08:00:00Z",
  "updatedAt": "2025-01-15T12:00:00Z"
}

Delete a project

Deleting a project is permanent and irreversible. All data, branches, and backups will be destroyed.
curl -X DELETE https://api.case.dev/database/v1/projects/proj_abc123 \
  -H "Authorization: Bearer $CASEDEV_API_KEY"

Regions reference

RegionLocationUse case
aws-us-east-1N. VirginiaUS East coast, default
aws-us-east-2OhioUS Central
aws-us-west-2OregonUS West coast
aws-eu-central-1FrankfurtEU users, GDPR
aws-eu-west-1IrelandEU users
aws-eu-west-2LondonUK users
aws-ap-southeast-1SingaporeAsia-Pacific
aws-ap-southeast-2SydneyAustralia/NZ
Choose a region close to your application servers for lowest latency. For compliance requirements (GDPR, data residency), select a region in the appropriate jurisdiction.

Project statuses

StatusDescription
activeProject is running and accepting connections
suspendedProject is paused (no compute charges, data retained)
deletedProject has been deleted (cannot be recovered)