{
  "openapi": "3.1.0",
  "info": {
    "title": "Probara API",
    "version": "1.0.0",
    "description": "Integrator-facing REST API for Probara (test case management). Authenticate with organization-scoped API keys via Bearer token.\n\nIdempotent requests: unsafe operations (POST, PUT, PATCH, DELETE) accept an optional `Idempotency-Key` header (see `components.parameters.IdempotencyKey`). A replayed response carries `Idempotency-Replayed: true`. A duplicate received while the original is still in flight responds `409` with a `Retry-After` header. Reusing a key with a different request fingerprint responds `422`. An invalid key (empty or over 255 visible ASCII characters) responds `400`. Keys are retained for 24 hours."
  },
  "servers": [
    {
      "url": "https://probara.net",
      "description": "Production"
    },
    {
      "url": "http://localhost:8787",
      "description": "Local Worker dev server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Organization-scoped API token. Send `Authorization: Bearer <secret>`. The token determines the active organization; `X-Organization-Id` is not required for integrators."
      },
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "tcms_session",
        "description": "Browser session cookie set by `POST /api/v1/auth/signup` (create/repair) or `POST /api/v1/auth/login`. In production the cookie name is `__Host-tcms_session`."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optional. Makes this request safely retryable: identical retries within the 24-hour retention window replay the original response (with an `Idempotency-Replayed: true` response header) instead of re-executing the mutation. A duplicate received while the first request is still in flight responds `409` with a `Retry-After` header. Reusing the key with a different request (different method, path, or body) responds `422`. The value must be non-empty and no longer than 255 visible ASCII characters, or the request responds `400`."
      }
    },
    "schemas": {
      "ApiErrorCode": {
        "type": "string",
        "enum": [
          "validation_failed",
          "not_found",
          "conflict",
          "last_owner",
          "unauthorized",
          "forbidden",
          "email_not_verified",
          "email_send_failed",
          "turnstile_failed",
          "too_many_requests",
          "unsupported_media_type",
          "internal_error",
          "immutable_field",
          "system_field",
          "system_field_readonly",
          "field_has_values",
          "not_system_field",
          "storage_quota_exceeded",
          "staging_already_committed",
          "file_too_large",
          "too_many_cases",
          "too_many_attachments",
          "too_many_suites",
          "parse_failed",
          "empty_import",
          "organization_suspended",
          "seat_limit_exceeded",
          "project_limit_exceeded",
          "api_result_limit_exceeded",
          "email_recipient_suppressed"
        ]
      },
      "AuditAssigneeChange": {
        "type": "object",
        "properties": {
          "from": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "ulid": {
                "type": "string",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "ulid",
              "name"
            ]
          },
          "to": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "ulid": {
                "type": "string",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "ulid",
              "name"
            ]
          },
          "via": {
            "type": "string",
            "enum": [
              "open",
              "patch",
              "reconcile"
            ]
          }
        },
        "required": [
          "from",
          "to",
          "via"
        ]
      },
      "AuditBulkCases": {
        "type": "object",
        "properties": {
          "cases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ulid": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                },
                "caseDisplayId": {
                  "type": "string",
                  "minLength": 1
                },
                "titleSnapshot": {
                  "type": "string"
                },
                "fromStatus": {
                  "type": "string",
                  "enum": [
                    "untested",
                    "retested",
                    "passed",
                    "failed",
                    "skipped",
                    "blocked"
                  ]
                },
                "toStatus": {
                  "type": "string",
                  "enum": [
                    "untested",
                    "retested",
                    "passed",
                    "failed",
                    "skipped",
                    "blocked"
                  ]
                },
                "fromAssignee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "name"
                  ]
                },
                "toAssignee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "name"
                  ]
                },
                "statusAtRemoval": {
                  "type": "string",
                  "enum": [
                    "untested",
                    "retested",
                    "passed",
                    "failed",
                    "skipped",
                    "blocked"
                  ]
                },
                "skipped": {
                  "type": "string",
                  "enum": [
                    "unchanged",
                    "not_found",
                    "locked"
                  ]
                },
                "truncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "ulid",
                "caseDisplayId",
                "titleSnapshot"
              ]
            }
          },
          "omittedCount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "summary": {
            "type": "object",
            "properties": {
              "affected": {
                "type": "integer",
                "minimum": 0
              },
              "unchanged": {
                "type": "integer",
                "minimum": 0
              },
              "statusFrom": {
                "type": "string",
                "enum": [
                  "untested",
                  "retested",
                  "passed",
                  "failed",
                  "skipped",
                  "blocked"
                ]
              },
              "statusTo": {
                "type": "string",
                "enum": [
                  "untested",
                  "retested",
                  "passed",
                  "failed",
                  "skipped",
                  "blocked"
                ]
              },
              "assigneeFrom": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "ulid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "ulid",
                  "name"
                ]
              },
              "assigneeTo": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "ulid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "ulid",
                  "name"
                ]
              }
            },
            "required": [
              "affected",
              "unchanged"
            ]
          }
        },
        "required": [
          "cases",
          "summary"
        ]
      },
      "AuditRunAggregates": {
        "type": "object",
        "properties": {
          "countPassed": {
            "type": "integer",
            "minimum": 0
          },
          "countFailed": {
            "type": "integer",
            "minimum": 0
          },
          "countBlocked": {
            "type": "integer",
            "minimum": 0
          },
          "countSkipped": {
            "type": "integer",
            "minimum": 0
          },
          "countUntested": {
            "type": "integer",
            "minimum": 0
          },
          "totalDurationMs": {
            "type": "integer",
            "minimum": 0
          },
          "projectedStatus": {
            "type": "string",
            "enum": [
              "passed",
              "failed",
              "aborted"
            ]
          }
        },
        "required": [
          "countPassed",
          "countFailed",
          "countBlocked",
          "countSkipped",
          "countUntested",
          "totalDurationMs",
          "projectedStatus"
        ]
      },
      "AuditEventDiff": {
        "type": "object",
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fromLabel": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "toLabel": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "truncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "field",
                "from",
                "to"
              ]
            }
          },
          "customFieldChanges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fieldUlid": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                },
                "fieldLabel": {
                  "type": "string"
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  ]
                },
                "truncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "fieldUlid",
                "fieldLabel",
                "from",
                "to"
              ]
            }
          },
          "stepsChange": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "replaced"
                    ]
                  },
                  "previousCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "nextCount": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "kind",
                  "previousCount",
                  "nextCount"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "detailed"
                    ]
                  },
                  "previousCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "nextCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "summary": {
                    "type": "object",
                    "properties": {
                      "added": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "removed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "modified": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "reordered": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "added",
                      "removed",
                      "modified",
                      "reordered"
                    ]
                  },
                  "entries": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "verdict": {
                          "type": "string",
                          "enum": [
                            "added",
                            "removed",
                            "modified",
                            "reordered"
                          ]
                        },
                        "label": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "enum": [
                                  "action",
                                  "data",
                                  "expected"
                                ]
                              },
                              "from": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "to": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "truncated": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "field",
                              "from",
                              "to"
                            ]
                          }
                        },
                        "position": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            "to": {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ]
                        },
                        "attachments": {
                          "type": "object",
                          "properties": {
                            "added": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "filename": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "ulid",
                                  "filename"
                                ]
                              }
                            },
                            "removed": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "filename": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "ulid",
                                  "filename"
                                ]
                              }
                            }
                          },
                          "required": [
                            "added",
                            "removed"
                          ]
                        }
                      },
                      "required": [
                        "ulid",
                        "verdict",
                        "label"
                      ]
                    }
                  },
                  "omittedCount": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "kind",
                  "previousCount",
                  "nextCount",
                  "summary",
                  "entries"
                ]
              }
            ]
          },
          "visibilityChange": {
            "type": "object",
            "properties": {
              "allProjectsFrom": {
                "type": "boolean"
              },
              "allProjectsTo": {
                "type": "boolean"
              },
              "added": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "name"
                  ]
                }
              },
              "removed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "name"
                  ]
                }
              }
            },
            "required": [
              "allProjectsFrom",
              "allProjectsTo",
              "added",
              "removed"
            ]
          },
          "optionsChange": {
            "type": "object",
            "properties": {
              "added": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "name"
                  ]
                }
              },
              "removed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "name"
                  ]
                }
              },
              "renamed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ulid",
                    "from",
                    "to"
                  ]
                }
              }
            },
            "required": [
              "added",
              "removed",
              "renamed"
            ]
          },
          "assigneeChange": {
            "type": "object",
            "properties": {
              "from": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "ulid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "ulid",
                  "name"
                ]
              },
              "to": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "ulid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "ulid",
                  "name"
                ]
              },
              "via": {
                "type": "string",
                "enum": [
                  "open",
                  "patch",
                  "reconcile"
                ]
              }
            },
            "required": [
              "from",
              "to",
              "via"
            ]
          },
          "runAggregates": {
            "type": "object",
            "properties": {
              "countPassed": {
                "type": "integer",
                "minimum": 0
              },
              "countFailed": {
                "type": "integer",
                "minimum": 0
              },
              "countBlocked": {
                "type": "integer",
                "minimum": 0
              },
              "countSkipped": {
                "type": "integer",
                "minimum": 0
              },
              "countUntested": {
                "type": "integer",
                "minimum": 0
              },
              "totalDurationMs": {
                "type": "integer",
                "minimum": 0
              },
              "projectedStatus": {
                "type": "string",
                "enum": [
                  "passed",
                  "failed",
                  "aborted"
                ]
              }
            },
            "required": [
              "countPassed",
              "countFailed",
              "countBlocked",
              "countSkipped",
              "countUntested",
              "totalDurationMs",
              "projectedStatus"
            ]
          },
          "bulkCases": {
            "type": "object",
            "properties": {
              "cases": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseDisplayId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "titleSnapshot": {
                      "type": "string"
                    },
                    "fromStatus": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "toStatus": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "fromAssignee": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "toAssignee": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "statusAtRemoval": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "skipped": {
                      "type": "string",
                      "enum": [
                        "unchanged",
                        "not_found",
                        "locked"
                      ]
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ulid",
                    "caseDisplayId",
                    "titleSnapshot"
                  ]
                }
              },
              "omittedCount": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "summary": {
                "type": "object",
                "properties": {
                  "affected": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "unchanged": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "statusFrom": {
                    "type": "string",
                    "enum": [
                      "untested",
                      "retested",
                      "passed",
                      "failed",
                      "skipped",
                      "blocked"
                    ]
                  },
                  "statusTo": {
                    "type": "string",
                    "enum": [
                      "untested",
                      "retested",
                      "passed",
                      "failed",
                      "skipped",
                      "blocked"
                    ]
                  },
                  "assigneeFrom": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "ulid": {
                        "type": "string",
                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "ulid",
                      "name"
                    ]
                  },
                  "assigneeTo": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "ulid": {
                        "type": "string",
                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "ulid",
                      "name"
                    ]
                  }
                },
                "required": [
                  "affected",
                  "unchanged"
                ]
              }
            },
            "required": [
              "cases",
              "summary"
            ]
          }
        },
        "additionalProperties": {}
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "validation_failed",
                  "not_found",
                  "conflict",
                  "last_owner",
                  "unauthorized",
                  "forbidden",
                  "email_not_verified",
                  "email_send_failed",
                  "turnstile_failed",
                  "too_many_requests",
                  "unsupported_media_type",
                  "internal_error",
                  "immutable_field",
                  "system_field",
                  "system_field_readonly",
                  "field_has_values",
                  "not_system_field",
                  "storage_quota_exceeded",
                  "staging_already_committed",
                  "file_too_large",
                  "too_many_cases",
                  "too_many_attachments",
                  "too_many_suites",
                  "parse_failed",
                  "empty_import",
                  "organization_suspended",
                  "seat_limit_exceeded",
                  "project_limit_exceeded",
                  "api_result_limit_exceeded",
                  "email_recipient_suppressed"
                ]
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "details": {}
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "PaginationQuery": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200,
            "default": 50
          },
          "cursor": {
            "type": "string",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
          }
        }
      },
      "PageQuery": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "default": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200,
            "default": 50
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "tags": [
          "System"
        ],
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "Service health",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    }
                  },
                  "required": [
                    "status"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects": {
      "post": {
        "tags": [
          "Projects"
        ],
        "operationId": "createProject",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "pattern": "^[A-Z][A-Z0-9]*$"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  }
                },
                "required": [
                  "name",
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Project created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "name",
                    "id",
                    "description",
                    "avatarKey",
                    "avatarVersion",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      },
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "listProjects",
        "description": "Lists projects. Add `?include=stats` to embed per-project metrics and team on each item. Add `?memberUlid=<ULID,ULID>` to filter to projects whose team includes any of the listed members. Four additive presence/state filters narrow the page (and `total`) server-side, matching the displayed metric definitions: `runs`, `defects`, `milestones`, `cases`. Each is a CSV of option tokens; within one filter the options are OR-ed, across filters they are AND-ed, and unknown tokens are dropped.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Case-insensitive substring search"
            },
            "required": false,
            "description": "Case-insensitive substring search",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "stats"
              ],
              "description": "Embed per-project stats and team"
            },
            "required": false,
            "description": "Embed per-project stats and team",
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated member ULIDs; projects whose team includes any of them"
            },
            "required": false,
            "description": "Comma-separated member ULIDs; projects whose team includes any of them",
            "name": "memberUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filter by runs presence (CSV; OR within): without (no test runs), active (an open run), any (at least one run)"
            },
            "required": false,
            "description": "Filter by runs presence (CSV; OR within): without (no test runs), active (an open run), any (at least one run)",
            "name": "runs",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filter by unresolved-defect presence (CSV; OR within): has, without. \"defects\" means UNRESOLVED defects (status open or in_progress)"
            },
            "required": false,
            "description": "Filter by unresolved-defect presence (CSV; OR within): has, without. \"defects\" means UNRESOLVED defects (status open or in_progress)",
            "name": "defects",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filter by live-milestone presence (CSV; OR within): has, without (live = not soft-deleted)"
            },
            "required": false,
            "description": "Filter by live-milestone presence (CSV; OR within): has, without (live = not soft-deleted)",
            "name": "milestones",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filter by active-case presence (CSV; OR within): has, without (active = non-archived)"
            },
            "required": false,
            "description": "Filter by active-case presence (CSV; OR within): has, without (active = non-archived)",
            "name": "cases",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Project page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatarKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatarVersion": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "stats": {
                            "type": "object",
                            "properties": {
                              "cases": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "runs": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "runsInProgress": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "defectsUnresolved": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "milestones": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "cases",
                              "runs",
                              "runsInProgress",
                              "defectsUnresolved",
                              "milestones"
                            ]
                          },
                          "team": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "firstName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "lastName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "avatarKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "avatarVersion": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "userUlid",
                                "firstName",
                                "lastName",
                                "avatarKey",
                                "avatarVersion"
                              ]
                            }
                          },
                          "teamCount": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "name",
                          "id",
                          "description",
                          "avatarKey",
                          "avatarVersion",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/id-available": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "checkProjectIdAvailable",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "^[A-Z][A-Z0-9]*$"
            },
            "required": true,
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "available"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "getProject",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "name",
                    "id",
                    "description",
                    "avatarKey",
                    "avatarVersion",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "operationId": "updateProject",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "pattern": "^[A-Z][A-Z0-9]*$"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "name",
                    "id",
                    "description",
                    "avatarKey",
                    "avatarVersion",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "operationId": "deleteProject",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Project deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/avatar": {
      "post": {
        "tags": [
          "Projects"
        ],
        "operationId": "uploadProjectAvatar",
        "summary": "Upload or replace a project avatar image",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PNG, JPEG, or WebP (max 5 MiB)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated avatar reference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "avatarKey",
                    "avatarVersion"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "operationId": "deleteProjectAvatar",
        "summary": "Remove a project avatar image",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar cleared",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "avatarKey",
                    "avatarVersion"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/suites/case-counts": {
      "get": {
        "tags": [
          "Suites"
        ],
        "operationId": "getProjectSuiteCaseCounts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Direct case counts by suite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "suiteUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseCount": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "suiteUlid",
                          "caseCount"
                        ]
                      }
                    },
                    "unassignedCount": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "items",
                    "unassignedCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/suites": {
      "post": {
        "tags": [
          "Suites"
        ],
        "operationId": "createSuite",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "parentUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Suite created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "suiteNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "parentUlid",
                    "name",
                    "description",
                    "suiteNumber",
                    "displayId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Suites"
        ],
        "operationId": "listRootSuites",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Root suites page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*$"
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "suiteNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "displayId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "projectId",
                          "parentUlid",
                          "name",
                          "description",
                          "suiteNumber",
                          "displayId",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/suites/by-display-id/{displayId}": {
      "get": {
        "tags": [
          "Suites"
        ],
        "operationId": "getSuiteByDisplayId",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "displayId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Suite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "suiteNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "parentUlid",
                    "name",
                    "description",
                    "suiteNumber",
                    "displayId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/suites/{suiteUlid}/children": {
      "get": {
        "tags": [
          "Suites"
        ],
        "operationId": "listSuiteChildren",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "suiteUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Child suites page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*$"
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "suiteNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "displayId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "projectId",
                          "parentUlid",
                          "name",
                          "description",
                          "suiteNumber",
                          "displayId",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/milestones": {
      "get": {
        "tags": [
          "Milestones"
        ],
        "operationId": "listMilestones",
        "summary": "List milestones (flat or grouped by parent)",
        "description": "Returns a page of milestones. Default (`view=flat`) pages over all live milestones. With `view=tree` the page is sliced over parent milestones only; each parent carries its live direct children in a `children` array, and `total` counts parent milestones only. Children are plain milestone objects and never carry their own `children`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "flat",
                "tree"
              ],
              "default": "flat"
            },
            "required": false,
            "name": "view",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Milestones page (flat or tree)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "upcoming",
                              "active",
                              "completed"
                            ]
                          },
                          "startAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "dueAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "forecastAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "completedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "parentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "progress": {
                            "type": "object",
                            "properties": {
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "closedRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "percentComplete": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "passRate": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "passed": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "failed": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "blocked": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "skipped": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "untested": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "totalRuns",
                              "closedRuns",
                              "percentComplete",
                              "passRate",
                              "passed",
                              "failed",
                              "blocked",
                              "skipped",
                              "untested"
                            ]
                          },
                          "author": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "displayName": {
                                    "type": "string"
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "displayName",
                                  "avatarKey"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "childCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "testCaseCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "children": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "projectId": {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Z0-9]*$"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "upcoming",
                                    "active",
                                    "completed"
                                  ]
                                },
                                "startAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "dueAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "forecastAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "completedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "parentId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "progress": {
                                  "type": "object",
                                  "properties": {
                                    "totalRuns": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "closedRuns": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "percentComplete": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 100
                                    },
                                    "passRate": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 100
                                    },
                                    "passed": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "failed": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "blocked": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "skipped": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "untested": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "totalRuns",
                                    "closedRuns",
                                    "percentComplete",
                                    "passRate",
                                    "passed",
                                    "failed",
                                    "blocked",
                                    "skipped",
                                    "untested"
                                  ]
                                },
                                "author": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "user"
                                          ]
                                        },
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "displayName": {
                                          "type": "string"
                                        },
                                        "avatarKey": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "ulid",
                                        "displayName",
                                        "avatarKey"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "api_token"
                                          ]
                                        },
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "ulid",
                                        "name"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "childCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "testCaseCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "projectId",
                                "name",
                                "description",
                                "status",
                                "startAt",
                                "dueAt",
                                "forecastAt",
                                "completedAt",
                                "parentId",
                                "progress",
                                "author",
                                "childCount",
                                "testCaseCount",
                                "createdAt",
                                "updatedAt"
                              ],
                              "additionalProperties": false
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "projectId",
                          "name",
                          "description",
                          "status",
                          "startAt",
                          "dueAt",
                          "forecastAt",
                          "completedAt",
                          "parentId",
                          "progress",
                          "author",
                          "childCount",
                          "testCaseCount",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Milestones"
        ],
        "operationId": "createMilestone",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "upcoming",
                      "active",
                      "completed"
                    ],
                    "default": "upcoming"
                  },
                  "startAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "dueAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "forecastAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "parentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Milestone created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "upcoming",
                        "active",
                        "completed"
                      ]
                    },
                    "startAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "dueAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "forecastAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "completedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "totalRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closedRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "percentComplete": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "passRate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "totalRuns",
                        "closedRuns",
                        "percentComplete",
                        "passRate",
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "childCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "testCaseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "name",
                    "description",
                    "status",
                    "startAt",
                    "dueAt",
                    "forecastAt",
                    "completedAt",
                    "parentId",
                    "progress",
                    "author",
                    "childCount",
                    "testCaseCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/milestones/{milestoneUlid}": {
      "get": {
        "tags": [
          "Milestones"
        ],
        "operationId": "getMilestone",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "milestoneUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Milestone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "upcoming",
                        "active",
                        "completed"
                      ]
                    },
                    "startAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "dueAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "forecastAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "completedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "totalRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closedRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "percentComplete": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "passRate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "totalRuns",
                        "closedRuns",
                        "percentComplete",
                        "passRate",
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "childCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "testCaseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "name",
                    "description",
                    "status",
                    "startAt",
                    "dueAt",
                    "forecastAt",
                    "completedAt",
                    "parentId",
                    "progress",
                    "author",
                    "childCount",
                    "testCaseCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Milestones"
        ],
        "operationId": "updateMilestone",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "milestoneUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "upcoming",
                      "active",
                      "completed"
                    ]
                  },
                  "startAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "dueAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "forecastAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "parentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Milestone updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "upcoming",
                        "active",
                        "completed"
                      ]
                    },
                    "startAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "dueAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "forecastAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "completedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "totalRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closedRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "percentComplete": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "passRate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "totalRuns",
                        "closedRuns",
                        "percentComplete",
                        "passRate",
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "childCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "testCaseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "name",
                    "description",
                    "status",
                    "startAt",
                    "dueAt",
                    "forecastAt",
                    "completedAt",
                    "parentId",
                    "progress",
                    "author",
                    "childCount",
                    "testCaseCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Milestones"
        ],
        "operationId": "deleteMilestone",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "milestoneUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Milestone soft-deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/defects": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listDefects",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated defect statuses (open, in_progress, resolved, closed)"
            },
            "required": false,
            "description": "Comma-separated defect statuses (open, in_progress, resolved, closed)",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated set of option ULIDs of the org defect_severity system field (OR within; single value accepted)"
            },
            "required": false,
            "description": "Comma-separated set of option ULIDs of the org defect_severity system field (OR within; single value accepted)",
            "name": "severity",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated set of option ULIDs of the org defect_priority system field (OR within; single value accepted)"
            },
            "required": false,
            "description": "Comma-separated set of option ULIDs of the org defect_priority system field (OR within; single value accepted)",
            "name": "priority",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated set of organization member ULIDs (OR within; single value accepted; unresolvable ULIDs are ignored)"
            },
            "required": false,
            "description": "Comma-separated set of organization member ULIDs (OR within; single value accepted; unresolvable ULIDs are ignored)",
            "name": "assigneeUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Title substring or defect number (D-<n> or bare integer)"
            },
            "required": false,
            "description": "Title substring or defect number (D-<n> or bare integer)",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "d0_7",
                "d7_14",
                "d14_30",
                "d30plus"
              ],
              "description": "Open-defect age bucket shortcut"
            },
            "required": false,
            "description": "Open-defect age bucket shortcut",
            "name": "aging",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated defect custom-field ULIDs to embed as customFieldValues on each item"
            },
            "required": false,
            "description": "Comma-separated defect custom-field ULIDs to embed as customFieldValues on each item",
            "name": "fields",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Repeatable custom-field filters: <fieldUlid>:<value[,value…]> (option ULIDs, true/false, user ULID, or empty)"
            },
            "required": false,
            "description": "Repeatable custom-field filters: <fieldUlid>:<value[,value…]> (option ULIDs, true/false, user ULID, or empty)",
            "name": "cf",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Return only defects assigned to the milestone with this ULID"
            },
            "required": false,
            "description": "Return only defects assigned to the milestone with this ULID",
            "name": "milestoneUlid",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Defects page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "defectNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "in_progress",
                              "resolved",
                              "closed"
                            ]
                          },
                          "resolution": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "fixed",
                              "wont_fix",
                              "duplicate",
                              "cannot_reproduce",
                              null
                            ]
                          },
                          "reporterUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "assigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "tags": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "milestoneUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "duplicateOfUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "resolvedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "closedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "occurrenceCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "lastSeenAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "systemFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          },
                          "customFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "defectNumber",
                          "title",
                          "description",
                          "status",
                          "resolution",
                          "reporterUlid",
                          "assigneeUlid",
                          "tags",
                          "milestoneUlid",
                          "duplicateOfUlid",
                          "resolvedAt",
                          "closedAt",
                          "createdAt",
                          "updatedAt",
                          "occurrenceCount",
                          "lastSeenAt",
                          "systemFieldValues"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "createDefect",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "assigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "tags": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "maxItems": 50
                  },
                  "milestoneUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "customFieldValues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "value": {}
                      },
                      "required": [
                        "fieldUlid"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Defect created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "defectNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "in_progress",
                        "resolved",
                        "closed"
                      ]
                    },
                    "resolution": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "fixed",
                        "wont_fix",
                        "duplicate",
                        "cannot_reproduce",
                        null
                      ]
                    },
                    "reporterUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "duplicateOfUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "resolvedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "defectNumber",
                    "title",
                    "description",
                    "status",
                    "resolution",
                    "reporterUlid",
                    "assigneeUlid",
                    "tags",
                    "milestoneUlid",
                    "duplicateOfUlid",
                    "resolvedAt",
                    "closedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/defects/metrics": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "getDefectMetrics",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Open-defect dashboard metrics (severity, aging, reopen rate, MTTR, milestones)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalOpen": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "openBySeverity": {
                      "type": "object",
                      "properties": {
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "optionUlid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "systemKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "icon": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "optionUlid",
                              "systemKey",
                              "name",
                              "icon",
                              "color",
                              "count"
                            ]
                          }
                        },
                        "unset": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "options",
                        "unset"
                      ]
                    },
                    "aging": {
                      "type": "object",
                      "properties": {
                        "d0_7": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "d7_14": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "d14_30": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "d30plus": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "d0_7",
                        "d7_14",
                        "d14_30",
                        "d30plus"
                      ]
                    },
                    "reopenRate": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 1
                    },
                    "mttrMs": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "byMilestone": {
                      "type": "object",
                      "properties": {
                        "milestones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "ulid",
                              "name",
                              "count"
                            ]
                          }
                        },
                        "unassigned": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "milestones",
                        "unassigned"
                      ]
                    },
                    "maxAgeDaysOpen": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    }
                  },
                  "required": [
                    "totalOpen",
                    "openBySeverity",
                    "aging",
                    "reopenRate",
                    "mttrMs",
                    "byMilestone",
                    "maxAgeDaysOpen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "getDefect",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Defect with occurrence summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "defectNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "in_progress",
                        "resolved",
                        "closed"
                      ]
                    },
                    "resolution": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "fixed",
                        "wont_fix",
                        "duplicate",
                        "cannot_reproduce",
                        null
                      ]
                    },
                    "reporterUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "duplicateOfUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "resolvedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "occurrenceCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "lastSeenAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "affectedCaseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "defectNumber",
                    "title",
                    "description",
                    "status",
                    "resolution",
                    "reporterUlid",
                    "assigneeUlid",
                    "tags",
                    "milestoneUlid",
                    "duplicateOfUlid",
                    "resolvedAt",
                    "closedAt",
                    "createdAt",
                    "updatedAt",
                    "occurrenceCount",
                    "lastSeenAt",
                    "affectedCaseCount",
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Defects"
        ],
        "operationId": "updateDefect",
        "summary": "Update defect",
        "description": "Partial update. Status transitions follow the guided lifecycle map; illegal transitions return 422 validation_failed with field path `status`. Resolving as duplicate requires `duplicateOfUlid` referencing a canonical defect in the same project (chains flatten to the root). Reopening from resolved or closed clears resolution, duplicate pointer, and managed timestamps. Requires organization role owner, admin, or member; viewers receive 403 before any write.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "in_progress",
                      "resolved",
                      "closed"
                    ]
                  },
                  "resolution": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "fixed",
                      "wont_fix",
                      "duplicate",
                      "cannot_reproduce",
                      null
                    ]
                  },
                  "assigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "tags": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "maxItems": 50
                  },
                  "milestoneUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "duplicateOfUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated defect",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "defectNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "in_progress",
                        "resolved",
                        "closed"
                      ]
                    },
                    "resolution": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "fixed",
                        "wont_fix",
                        "duplicate",
                        "cannot_reproduce",
                        null
                      ]
                    },
                    "reporterUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "duplicateOfUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "resolvedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "defectNumber",
                    "title",
                    "description",
                    "status",
                    "resolution",
                    "reporterUlid",
                    "assigneeUlid",
                    "tags",
                    "milestoneUlid",
                    "duplicateOfUlid",
                    "resolvedAt",
                    "closedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Defects"
        ],
        "operationId": "deleteDefect",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Defect deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/result-links": {
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "createDefectResultLink",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resultUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "stepSnapshotUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "resultUlid"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing link (idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "resultUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "stepSnapshotUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "linkedByUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "resultUlid",
                    "stepSnapshotUlid",
                    "linkedByUlid",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Link created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "resultUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "stepSnapshotUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "linkedByUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "resultUlid",
                    "stepSnapshotUlid",
                    "linkedByUlid",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listDefectResultLinks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Defect occurrence page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "linkedByUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "result": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "skipped",
                                  "blocked"
                                ]
                              },
                              "executedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "ulid",
                              "status",
                              "executedAt"
                            ]
                          },
                          "run": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "name"
                            ]
                          },
                          "testCase": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "title"
                            ]
                          },
                          "stepSnapshotUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "required": [
                          "ulid",
                          "createdAt",
                          "linkedByUlid",
                          "result",
                          "run",
                          "testCase",
                          "stepSnapshotUlid"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/result-links/{linkUlid}": {
      "delete": {
        "tags": [
          "Defects"
        ],
        "operationId": "deleteDefectResultLink",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "linkUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Link removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/case-links": {
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "createDefectCaseLink",
        "summary": "Manually link a test case to a defect",
        "description": "Creates a manual defect↔case link independent of run history. Idempotent: re-linking an existing (defect, case) pair returns 200 with the existing link. Linking a previously-dismissed case clears the dismissal in the same transaction (override-on-link). Emits one `defect.case_linked` audit event on first creation.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "testCaseUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "testCaseUlid"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing link returned (idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "testCaseUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "createdByUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "testCaseUlid",
                    "createdByUlid",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Manual link created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "testCaseUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "createdByUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "testCaseUlid",
                    "createdByUlid",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect or test case not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/case-links/{linkUlid}": {
      "delete": {
        "tags": [
          "Defects"
        ],
        "operationId": "deleteDefectCaseLink",
        "summary": "Remove a manual case link from a defect",
        "description": "Removes the manual link. The link must belong to the referenced defect. Does not affect run results or defect_result_links. If the case still has run occurrences it remains in the affected-cases list as run-derived. Emits one `defect.case_unlinked` audit event.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "linkUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Link removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Link not found for this defect",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/case-dismissals": {
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "createDefectCaseDismissal",
        "summary": "Dismiss a run-derived case from a defect's affected-cases list",
        "description": "Suppresses a run-derived-only case from the affected-cases list for this defect without modifying any run result. Non-sticky: the case re-surfaces when a new occurrence's executed_at is strictly greater than dismissed_at. Idempotent: re-dismissing refreshes dismissed_at to the current time and returns 200. Emits one `defect.case_dismissed` audit event per call.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "testCaseUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "testCaseUlid"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dismissal refreshed (idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "testCaseUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "dismissedByUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "dismissedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "testCaseUlid",
                    "dismissedByUlid",
                    "dismissedAt"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Dismissal created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "testCaseUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "dismissedByUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "dismissedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "testCaseUlid",
                    "dismissedByUlid",
                    "dismissedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect or test case not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/affected-cases": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listDefectAffectedCases",
        "summary": "List test cases affected by a defect",
        "description": "Merged list of test cases affected by this defect, deduped by test_case_id. Sources: (A) manually linked cases (defect_case_links) with isManuallyLinked=true and manualLinkUlid set; (B) run-derived cases from defect_result_links; (C) effective dismissals excluded. Manual-only cases have occurrenceCount=0, latestResult=null. Run-derived cases can be suppressed by a dismissal whose dismissed_at >= their latest executed_at.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Affected test case page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "testCaseUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "testCaseTitle": {
                            "type": "string"
                          },
                          "caseNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "displayId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                          },
                          "occurrenceCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "lastLinkedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "latestResult": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "skipped",
                                  "blocked"
                                ]
                              },
                              "executedAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "runUlid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "runName": {
                                "type": "string"
                              },
                              "resultUlid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              }
                            },
                            "required": [
                              "status",
                              "executedAt",
                              "runUlid",
                              "runName",
                              "resultUlid"
                            ]
                          },
                          "verification": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "verified",
                              "failed_after_resolve",
                              "pending",
                              null
                            ]
                          },
                          "isManuallyLinked": {
                            "type": "boolean"
                          },
                          "manualLinkUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "required": [
                          "testCaseUlid",
                          "testCaseTitle",
                          "caseNumber",
                          "displayId",
                          "occurrenceCount",
                          "lastLinkedAt",
                          "latestResult",
                          "verification",
                          "isManuallyLinked",
                          "manualLinkUlid"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/audit-events": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listDefectAuditEvents",
        "summary": "List audit events for a defect",
        "description": "Returns append-only audit events scoped to a single defect in reverse chronological order (ULID cursor).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "actorUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "entityType",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Defect-scoped audit event page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "project.created",
                              "project.updated",
                              "project.trashed",
                              "project.restored",
                              "project.deleted",
                              "suite.created",
                              "suite.updated",
                              "suite.deleted",
                              "suite.moved",
                              "test_case.created",
                              "test_case.updated",
                              "test_case.archived",
                              "test_case.restored",
                              "test_case.deleted",
                              "test_case.moved",
                              "milestone.created",
                              "milestone.updated",
                              "milestone.deleted",
                              "custom_field.created",
                              "custom_field.updated",
                              "custom_field.deleted",
                              "custom_field.options_reordered",
                              "core_section.renamed",
                              "core_section.reset",
                              "member.role_changed",
                              "member.removed",
                              "invitation.sent",
                              "invitation.resent",
                              "invitation.revoked",
                              "invitation.accepted",
                              "api_token.created",
                              "api_token.revoked",
                              "run.created",
                              "run.updated",
                              "run.closed",
                              "run.aborted",
                              "run.reopened",
                              "run.deleted",
                              "run.case_step_actual_result_set",
                              "run.case_added",
                              "run.case_marked",
                              "run.case_step_marked",
                              "run.case_assigned",
                              "run.reran_failed",
                              "run.case_retried",
                              "run.case_removed",
                              "run.result_attachment_committed",
                              "run.result_attachment_deleted",
                              "run.cases_bulk_marked",
                              "run.cases_bulk_assigned",
                              "run.cases_bulk_retried",
                              "run.cases_bulk_removed",
                              "run.cases_bulk_result_submitted",
                              "run.cloned",
                              "defect.created",
                              "defect.updated",
                              "defect.status_changed",
                              "defect.reopened",
                              "defect.deleted",
                              "defect.linked",
                              "defect.unlinked",
                              "defect.attachment_added",
                              "defect.attachment_deleted",
                              "defect.commented",
                              "defect.comment_updated",
                              "defect.comment_deleted",
                              "defect.case_linked",
                              "defect.case_unlinked",
                              "defect.case_dismissed",
                              "test_case.commented",
                              "test_case.comment_updated",
                              "test_case.comment_deleted",
                              "test_case.comment_pinned",
                              "test_case.comment_unpinned",
                              "defect.comment_pinned",
                              "defect.comment_unpinned",
                              "environment.created",
                              "environment.updated",
                              "environment.deleted",
                              "milestone.status_changed",
                              "run.milestone_assigned",
                              "run.milestone_removed",
                              "configuration_group.created",
                              "configuration_group.updated",
                              "configuration_group.deleted",
                              "configuration.created",
                              "configuration.updated",
                              "configuration.deleted",
                              "test_plan.created",
                              "test_plan.updated",
                              "test_plan.deleted",
                              "test_plan.run_generated",
                              "test_plan.configurations_updated",
                              "test_plan.status_changed",
                              "test_plan.case_assignee_changed",
                              "organization.attachments_bulk_deleted",
                              "test_case.imported",
                              "test_case.cloned",
                              "suite.cloned",
                              "test_case.bulk_cloned",
                              "oauth_grant.created",
                              "oauth_grant.revoked"
                            ]
                          },
                          "actor": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "email": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "displayName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "firstName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "lastName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "avatarVersion": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "email",
                                  "displayName",
                                  "firstName",
                                  "lastName",
                                  "avatarKey",
                                  "avatarVersion"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "system"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind"
                                ]
                              }
                            ]
                          },
                          "entityType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "entityUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "entityLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "runUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "changes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "from": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "to": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "fromLabel": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "toLabel": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "from",
                                    "to"
                                  ]
                                }
                              },
                              "customFieldChanges": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "fieldUlid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "fieldLabel": {
                                      "type": "string"
                                    },
                                    "from": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "to": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "fieldUlid",
                                    "fieldLabel",
                                    "from",
                                    "to"
                                  ]
                                }
                              },
                              "stepsChange": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "replaced"
                                        ]
                                      },
                                      "previousCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "nextCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "previousCount",
                                      "nextCount"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "detailed"
                                        ]
                                      },
                                      "previousCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "nextCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "summary": {
                                        "type": "object",
                                        "properties": {
                                          "added": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "removed": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "modified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "reordered": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "added",
                                          "removed",
                                          "modified",
                                          "reordered"
                                        ]
                                      },
                                      "entries": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "verdict": {
                                              "type": "string",
                                              "enum": [
                                                "added",
                                                "removed",
                                                "modified",
                                                "reordered"
                                              ]
                                            },
                                            "label": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "fields": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "action",
                                                      "data",
                                                      "expected"
                                                    ]
                                                  },
                                                  "from": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "to": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "truncated": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "from",
                                                  "to"
                                                ]
                                              }
                                            },
                                            "position": {
                                              "type": "object",
                                              "properties": {
                                                "from": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                },
                                                "to": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                }
                                              },
                                              "required": [
                                                "from",
                                                "to"
                                              ]
                                            },
                                            "attachments": {
                                              "type": "object",
                                              "properties": {
                                                "added": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "ulid": {
                                                        "type": "string",
                                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                                      },
                                                      "filename": {
                                                        "type": [
                                                          "string",
                                                          "null"
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "ulid",
                                                      "filename"
                                                    ]
                                                  }
                                                },
                                                "removed": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "ulid": {
                                                        "type": "string",
                                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                                      },
                                                      "filename": {
                                                        "type": [
                                                          "string",
                                                          "null"
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "ulid",
                                                      "filename"
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "added",
                                                "removed"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "verdict",
                                            "label"
                                          ]
                                        }
                                      },
                                      "omittedCount": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "previousCount",
                                      "nextCount",
                                      "summary",
                                      "entries"
                                    ]
                                  }
                                ]
                              },
                              "visibilityChange": {
                                "type": "object",
                                "properties": {
                                  "allProjectsFrom": {
                                    "type": "boolean"
                                  },
                                  "allProjectsTo": {
                                    "type": "boolean"
                                  },
                                  "added": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "removed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "allProjectsFrom",
                                  "allProjectsTo",
                                  "added",
                                  "removed"
                                ]
                              },
                              "optionsChange": {
                                "type": "object",
                                "properties": {
                                  "added": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "removed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "renamed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "from": {
                                          "type": "string"
                                        },
                                        "to": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "from",
                                        "to"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "added",
                                  "removed",
                                  "renamed"
                                ]
                              },
                              "assigneeChange": {
                                "type": "object",
                                "properties": {
                                  "from": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "name"
                                    ]
                                  },
                                  "to": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "name"
                                    ]
                                  },
                                  "via": {
                                    "type": "string",
                                    "enum": [
                                      "open",
                                      "patch",
                                      "reconcile"
                                    ]
                                  }
                                },
                                "required": [
                                  "from",
                                  "to",
                                  "via"
                                ]
                              },
                              "runAggregates": {
                                "type": "object",
                                "properties": {
                                  "countPassed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countFailed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countBlocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countSkipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countUntested": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "totalDurationMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "projectedStatus": {
                                    "type": "string",
                                    "enum": [
                                      "passed",
                                      "failed",
                                      "aborted"
                                    ]
                                  }
                                },
                                "required": [
                                  "countPassed",
                                  "countFailed",
                                  "countBlocked",
                                  "countSkipped",
                                  "countUntested",
                                  "totalDurationMs",
                                  "projectedStatus"
                                ]
                              },
                              "bulkCases": {
                                "type": "object",
                                "properties": {
                                  "cases": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "caseDisplayId": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "titleSnapshot": {
                                          "type": "string"
                                        },
                                        "fromStatus": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "toStatus": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "fromAssignee": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "name"
                                          ]
                                        },
                                        "toAssignee": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "name"
                                          ]
                                        },
                                        "statusAtRemoval": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "skipped": {
                                          "type": "string",
                                          "enum": [
                                            "unchanged",
                                            "not_found",
                                            "locked"
                                          ]
                                        },
                                        "truncated": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "caseDisplayId",
                                        "titleSnapshot"
                                      ]
                                    }
                                  },
                                  "omittedCount": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0
                                  },
                                  "summary": {
                                    "type": "object",
                                    "properties": {
                                      "affected": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "unchanged": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "statusFrom": {
                                        "type": "string",
                                        "enum": [
                                          "untested",
                                          "retested",
                                          "passed",
                                          "failed",
                                          "skipped",
                                          "blocked"
                                        ]
                                      },
                                      "statusTo": {
                                        "type": "string",
                                        "enum": [
                                          "untested",
                                          "retested",
                                          "passed",
                                          "failed",
                                          "skipped",
                                          "blocked"
                                        ]
                                      },
                                      "assigneeFrom": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "name"
                                        ]
                                      },
                                      "assigneeTo": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "name"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "affected",
                                      "unchanged"
                                    ]
                                  }
                                },
                                "required": [
                                  "cases",
                                  "summary"
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "action",
                          "actor",
                          "entityType",
                          "entityUlid",
                          "entityLabel",
                          "metadata",
                          "createdAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "events",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/attachments": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listDefectAttachments",
        "summary": "List defect evidence attachments",
        "description": "Returns image attachments in upload order (oldest first). Each item includes full and thumbnail URLs and uploader metadata. Viewers may list; only members and above may upload or delete.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment gallery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      }
                    }
                  },
                  "required": [
                    "attachments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "uploadDefectAttachments",
        "summary": "Upload defect evidence images",
        "description": "Processes each image to WebP full + thumbnail under the organization R2 prefix and persists attachment rows. Allowed MIME types: PNG, JPEG, WebP. Max 10 MiB per file, up to 10 files per request. Charges the organization `defect_attachment` storage counter. Emits `defect.attachment_added`. Viewers receive 403.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "description": "PNG, JPEG, or WebP (max 10 MiB each)"
                    },
                    "minItems": 1,
                    "maxItems": 10,
                    "description": "One or more `file` parts (max 10 per request)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      }
                    }
                  },
                  "required": [
                    "attachments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/attachments/{attachmentUlid}": {
      "delete": {
        "tags": [
          "Defects"
        ],
        "operationId": "deleteDefectAttachment",
        "summary": "Delete a defect evidence attachment",
        "description": "Removes the attachment row, both R2 objects, and refunds bytes from the organization storage counter. Emits `defect.attachment_deleted`. Viewers receive 403.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "attachmentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Attachment deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Attachment or defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/comments": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listDefectComments",
        "summary": "List defect discussion comments",
        "description": "Cursor pagination over top-level comments (`parentUlid` absent). Add `?sort=newest` to reverse the order; default is `oldest` (unchanged). Each item carries its `replyCount` and inline `replies[]` (chronological ascending, capped at 100), resolved `mentions[]`, and `pinnedAt`/`pinnedBy` when pinned. The response `pinned[]` sibling holds the complete pinned top-level set for the entity, ordered by `pinnedAt` ascending, independent of the paginated `items` cursor. Viewers may list; only members and above may create, edit, delete, or pin/unpin.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest"
              ],
              "default": "oldest"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Comment page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          },
                          "replyCount": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                          },
                          "replies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "author": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "editedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "disposition": {
                                        "type": "string",
                                        "enum": [
                                          "inline",
                                          "attachment"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "uploadedBy": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "displayName": {
                                            "type": "string"
                                          },
                                          "avatarKey": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "avatarVersion": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "positionTitle": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "default": null
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "displayName",
                                          "avatarKey",
                                          "avatarVersion"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbUrl": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "createdAt": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "disposition",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "uploadedBy",
                                      "url",
                                      "thumbUrl",
                                      "createdAt"
                                    ]
                                  },
                                  "default": []
                                },
                                "parentUlid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                                  "default": null
                                },
                                "pinnedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "default": null
                                },
                                "pinnedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "default": null,
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "mentions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "displayName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "displayName"
                                    ]
                                  },
                                  "default": []
                                }
                              },
                              "required": [
                                "ulid",
                                "body",
                                "author",
                                "createdAt",
                                "editedAt"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "pinned": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          },
                          "replyCount": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                          },
                          "replies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "author": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "editedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "disposition": {
                                        "type": "string",
                                        "enum": [
                                          "inline",
                                          "attachment"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "uploadedBy": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "displayName": {
                                            "type": "string"
                                          },
                                          "avatarKey": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "avatarVersion": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "positionTitle": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "default": null
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "displayName",
                                          "avatarKey",
                                          "avatarVersion"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbUrl": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "createdAt": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "disposition",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "uploadedBy",
                                      "url",
                                      "thumbUrl",
                                      "createdAt"
                                    ]
                                  },
                                  "default": []
                                },
                                "parentUlid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                                  "default": null
                                },
                                "pinnedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "default": null
                                },
                                "pinnedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "default": null,
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "mentions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "displayName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "displayName"
                                    ]
                                  },
                                  "default": []
                                }
                              },
                              "required": [
                                "ulid",
                                "body",
                                "author",
                                "createdAt",
                                "editedAt"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "createDefectComment",
        "summary": "Create a defect comment",
        "description": "Body is trimmed and may be empty when at least one attachment is present (image-only comments); whitespace-only text with no attachments returns 422. Max 5000 characters. Set `parentUlid` to create a depth-1 reply under an existing top-level comment on the same defect; replying to a reply returns `422 validation_failed`, and a `parentUlid` from another entity or organization returns `404 not_found`. Replies do NOT appear in the flat `items[]` enumeration of the listing endpoint — they are only reachable via their parent's `replies[]`. Emits `defect.commented` with a 140-character excerpt. Viewers receive 403.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "objectKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "thumbKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "mime": {
                          "type": "string",
                          "enum": [
                            "image/png",
                            "image/jpeg",
                            "image/webp"
                          ]
                        },
                        "byteSize": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "originalFilename": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "ulid",
                        "position"
                      ]
                    }
                  },
                  "parentUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect, or the parentUlid comment, not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/comments/{commentUlid}": {
      "patch": {
        "tags": [
          "Defects"
        ],
        "operationId": "updateDefectComment",
        "summary": "Edit a defect comment",
        "description": "Only the original author may edit. Body may be empty only while the comment keeps at least one attachment (image-only comments); an empty body with no attachments returns 422. Sets `editedAt` on success. Emits `defect.comment_updated`. Admins cannot edit another member's comment (403).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "objectKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "thumbKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "mime": {
                          "type": "string",
                          "enum": [
                            "image/png",
                            "image/jpeg",
                            "image/webp"
                          ]
                        },
                        "byteSize": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "originalFilename": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "ulid",
                        "position"
                      ]
                    }
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Defects"
        ],
        "operationId": "deleteDefectComment",
        "summary": "Delete a defect comment",
        "description": "Authors may delete their own comments. Organization admins may delete any comment. Other members receive 403. Deleting a top-level comment cascades to its replies, purging their attachments and emitting one `defect.comment_deleted` per cascaded reply. Emits `defect.comment_deleted`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Comment deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/comments/{commentUlid}/pin": {
      "post": {
        "tags": [
          "Defects"
        ],
        "operationId": "pinDefectComment",
        "summary": "Pin a defect comment",
        "description": "Pins a top-level comment so it renders in the `pinned[]` list ahead of the paginated feed, regardless of `sort`. Any member or above may pin any top-level comment; viewers receive 403. Pinning a reply (a comment with a non-null `parentUlid`) returns `422 validation_failed`. Sets `pinnedAt`/`pinnedBy` on the comment. No cap on the number of pinned comments per entity. Emits `defect.comment_pinned`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Pinned comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Defects"
        ],
        "operationId": "unpinDefectComment",
        "summary": "Unpin a defect comment",
        "description": "Clears `pinnedAt`/`pinnedBy` on a previously pinned top-level comment. Any member or above may unpin; viewers receive 403. Unpinning an already-unpinned comment is idempotent (no additional audit event). Unpinning a reply (a comment with a non-null `parentUlid`) returns `422 validation_failed`. Emits `defect.comment_unpinned`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Unpinned comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/comments:stage-attachment": {
      "post": {
        "tags": [
          "Comments"
        ],
        "operationId": "stageCommentAttachments",
        "summary": "Stage comment images before create/edit",
        "description": "Validates and processes each image (WebP full + thumbnail under `staging/<orgUlid>/`). Creates no database rows. Commit by including the returned refs in the `attachments` array of a comment create or patch request. Viewers receive 403.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "description": "PNG, JPEG, or WebP (max 10 MiB each)"
                    },
                    "minItems": 1,
                    "maxItems": 10,
                    "description": "One or more `file` parts (max 10 per request)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Staged attachment refs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "enum": [
                              "image/png",
                              "image/jpeg",
                              "image/webp"
                            ]
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "width": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "width",
                          "height",
                          "originalFilename"
                        ]
                      }
                    }
                  },
                  "required": [
                    "attachments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/api/v1/defects/{defectUlid}/custom-field-values": {
      "put": {
        "tags": [
          "Defects"
        ],
        "operationId": "replaceDefectCustomFieldValues",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "value": {}
                      },
                      "required": [
                        "fieldUlid"
                      ]
                    }
                  }
                },
                "required": [
                  "values"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replaced custom field values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/defects/{defectUlid}/custom-field-values/{fieldUlid}": {
      "patch": {
        "tags": [
          "Defects"
        ],
        "operationId": "patchDefectCustomFieldValue",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "defectUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "fieldUlid",
            "in": "path",
            "description": "ULID of the custom field definition to mutate."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {}
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated custom field values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Defect not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/environments": {
      "post": {
        "tags": [
          "Environments"
        ],
        "operationId": "createEnvironment",
        "summary": "Create an environment",
        "description": "Creates a named, slugged environment for the project. `slug` must be lowercase alphanumeric segments joined by single hyphens (e.g. `staging`, `pre-prod`). Duplicate live slugs within a project return `409 conflict`. Set `isDefault: true` to atomically demote any existing default.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "isDefault": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "name",
                  "slug"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Environment created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "slug",
                    "description",
                    "url",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Slug already in use within the project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Environments"
        ],
        "operationId": "listEnvironments",
        "summary": "List project environments",
        "description": "Returns the live (non-soft-deleted) environments for the project, newest first. Page-based pagination.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Environments page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "name",
                          "slug",
                          "description",
                          "url",
                          "isDefault",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/environments/{environmentUlid}": {
      "get": {
        "tags": [
          "Environments"
        ],
        "operationId": "getEnvironment",
        "summary": "Get a single environment",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "environmentUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Environment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "slug",
                    "description",
                    "url",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Environment not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Environments"
        ],
        "operationId": "updateEnvironment",
        "summary": "Partially update an environment",
        "description": "Partial update of `name`, `slug`, `description`, `url`, and `isDefault`. At least one field required. Promoting `isDefault: true` atomically demotes the current default. Duplicate live slug returns `409 conflict`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "environmentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated environment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "slug",
                    "description",
                    "url",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Environment not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Slug conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Environments"
        ],
        "operationId": "deleteEnvironment",
        "summary": "Soft-delete an environment",
        "description": "Soft-deletes the environment. Subsequent GETs return `404 not_found`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "environmentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Environment deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Environment not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/configuration-groups": {
      "post": {
        "tags": [
          "Configurations"
        ],
        "operationId": "createConfigurationGroup",
        "summary": "Create a configuration group",
        "description": "Creates a named configuration group (test-matrix axis) within a project. Duplicate live names within a project return `409 conflict`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Configuration group created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "position",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Name already in use within the project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Configurations"
        ],
        "operationId": "listConfigurationGroups",
        "summary": "List configuration groups for a project",
        "description": "Returns live configuration groups for the project. Add `?include=values` to embed the nested configuration values in each group.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "values"
              ],
              "description": "Embed nested configuration values"
            },
            "required": false,
            "description": "Embed nested configuration values",
            "name": "include",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration groups page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "name",
                          "position",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configuration-groups/{groupUlid}": {
      "get": {
        "tags": [
          "Configurations"
        ],
        "operationId": "getConfigurationGroup",
        "summary": "Get a single configuration group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "groupUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "position",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Configuration group not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Configurations"
        ],
        "operationId": "updateConfigurationGroup",
        "summary": "Partially update a configuration group",
        "description": "Partial update of `name`. At least one field required. Duplicate live name returns `409 conflict`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "groupUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated configuration group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "position",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Configuration group not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Name conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Configurations"
        ],
        "operationId": "deleteConfigurationGroup",
        "summary": "Soft-delete a configuration group",
        "description": "Soft-deletes the configuration group and all its nested configuration values.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "groupUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Configuration group deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Configuration group not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configuration-groups/{groupUlid}/configurations": {
      "post": {
        "tags": [
          "Configurations"
        ],
        "operationId": "createConfiguration",
        "summary": "Create a configuration value within a group",
        "description": "Creates a named configuration value (test-matrix cell) within a configuration group. Duplicate live names within a group return `409 conflict`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "groupUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Configuration value created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "groupUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "groupUlid",
                    "projectUlid",
                    "name",
                    "position",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Name already in use within the group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Configurations"
        ],
        "operationId": "listConfigurations",
        "summary": "List configuration values within a group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "groupUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration values page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "groupUlid",
                          "projectUlid",
                          "name",
                          "position",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Configuration group not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configurations/{configurationUlid}": {
      "patch": {
        "tags": [
          "Configurations"
        ],
        "operationId": "updateConfiguration",
        "summary": "Partially update a configuration value",
        "description": "Partial update of `name`. At least one field required. Duplicate live name within the group returns `409 conflict`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "configurationUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated configuration value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "groupUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "groupUlid",
                    "projectUlid",
                    "name",
                    "position",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Configuration value not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Name conflict within the group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Configurations"
        ],
        "operationId": "deleteConfiguration",
        "summary": "Soft-delete a configuration value",
        "description": "Soft-deletes the configuration value. Subsequent GETs return `404 not_found`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "configurationUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Configuration value deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Configuration value not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/test-cases": {
      "post": {
        "tags": [
          "Test cases"
        ],
        "operationId": "createTestCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "suiteUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "milestoneUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "tags": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "maxItems": 50
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "action": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "data": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "expected": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "objectKey": {
                                "type": "string",
                                "minLength": 1
                              },
                              "thumbKey": {
                                "type": "string",
                                "minLength": 1
                              },
                              "mime": {
                                "type": "string",
                                "enum": [
                                  "image/png",
                                  "image/jpeg",
                                  "image/webp"
                                ]
                              },
                              "byteSize": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "width": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "height": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "originalFilename": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "ulid",
                              "position"
                            ]
                          },
                          "maxItems": 50
                        }
                      },
                      "required": [
                        "position",
                        "action"
                      ]
                    },
                    "maxItems": 500
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Test case created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    },
                    "archivedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "suiteUlid",
                    "caseNumber",
                    "displayId",
                    "title",
                    "description",
                    "milestoneUlid",
                    "tags",
                    "steps",
                    "customFieldValues",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "listTestCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                },
                {
                  "type": "string",
                  "enum": [
                    "__none__"
                  ]
                }
              ]
            },
            "required": false,
            "name": "suiteUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "archived",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "milestoneUlid",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Test cases page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "displayId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "milestoneUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "tags": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "steps": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "position": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "action": {
                                  "type": "string"
                                },
                                "data": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expected": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "enum": [
                                          "image/png",
                                          "image/jpeg",
                                          "image/webp"
                                        ]
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "width": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "position": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "position"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "ulid",
                                "position",
                                "action",
                                "data",
                                "expected",
                                "attachments"
                              ]
                            }
                          },
                          "customFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          },
                          "archivedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "suiteUlid",
                          "caseNumber",
                          "displayId",
                          "title",
                          "description",
                          "milestoneUlid",
                          "tags",
                          "steps",
                          "customFieldValues",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/test-cases/archived": {
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "listArchivedTestCases",
        "summary": "List archived test cases (page-based)",
        "description": "Project-wide, page-based listing of archived test cases, most-recently-archived first. No suite filter applies. This is additive: the existing cursor-paginated listing (`archived=true`) keeps its `{items, nextCursor}` contract unchanged.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Archived test cases page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "displayId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "milestoneUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "tags": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "steps": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "position": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "action": {
                                  "type": "string"
                                },
                                "data": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expected": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "enum": [
                                          "image/png",
                                          "image/jpeg",
                                          "image/webp"
                                        ]
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "width": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "position": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "position"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "ulid",
                                "position",
                                "action",
                                "data",
                                "expected",
                                "attachments"
                              ]
                            }
                          },
                          "customFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          },
                          "archivedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "suiteUlid",
                          "caseNumber",
                          "displayId",
                          "title",
                          "description",
                          "milestoneUlid",
                          "tags",
                          "steps",
                          "customFieldValues",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/test-cases/search": {
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "searchTestCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Substring match (case-insensitive)"
            },
            "required": false,
            "description": "Substring match (case-insensitive)",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "cases",
                "suites"
              ],
              "description": "Search scope: all (default), cases, or suites"
            },
            "required": false,
            "description": "Search scope: all (default), cases, or suites",
            "name": "scope",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Custom field filter: <fieldUlid>:<value[,value…]>, repeatable"
            },
            "required": false,
            "description": "Custom field filter: <fieldUlid>:<value[,value…]>, repeatable",
            "name": "cf",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Max items returned (1–500, default 500)"
            },
            "required": false,
            "description": "Max items returned (1–500, default 500)",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Test case search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "displayId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "milestoneUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "tags": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "steps": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "position": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "action": {
                                  "type": "string"
                                },
                                "data": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "expected": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "enum": [
                                          "image/png",
                                          "image/jpeg",
                                          "image/webp"
                                        ]
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "width": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "position": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "position"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "ulid",
                                "position",
                                "action",
                                "data",
                                "expected",
                                "attachments"
                              ]
                            }
                          },
                          "customFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          },
                          "archivedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "suiteUlid",
                          "caseNumber",
                          "displayId",
                          "title",
                          "description",
                          "milestoneUlid",
                          "tags",
                          "steps",
                          "customFieldValues",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "items",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/test-cases/by-display-id/{displayId}": {
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "getTestCaseByDisplayId",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "displayId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Test case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    },
                    "archivedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "suiteUlid",
                    "caseNumber",
                    "displayId",
                    "title",
                    "description",
                    "milestoneUlid",
                    "tags",
                    "steps",
                    "customFieldValues",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/test-cases/case-identities": {
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "listTestCaseIdentities",
        "summary": "Resolve the subtree case identities ({ulid, suiteUlid}) of a project",
        "description": "Cursor-paginated (<=200/page). A case with no suite is returned with suiteUlid: null, mapping client-side to the virtual \"unassigned\" band.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Case identities page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "required": [
                          "ulid",
                          "suiteUlid"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Project not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/test-cases/bulk-archive": {
      "post": {
        "tags": [
          "Test cases"
        ],
        "operationId": "bulkArchiveTestCases",
        "summary": "Archive up to 200 test cases in one request",
        "description": "Case ULIDs that are nonexistent or belong to another organization/project are silently skipped (never surfaced, never counted). Already-archived in-scope cases count as `unchanged` (idempotent).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1,
                    "maxItems": 200
                  }
                },
                "required": [
                  "caseUlids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk archive result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "affected": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "affected",
                    "unchanged"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/runs": {
      "post": {
        "tags": [
          "Runs"
        ],
        "operationId": "createRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "environmentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "environment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 80
                  },
                  "defaultAssigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1
                  },
                  "caseAssignees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "caseUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "assigneeUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        }
                      },
                      "required": [
                        "caseUlid",
                        "assigneeUlid"
                      ]
                    }
                  },
                  "startedAt": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "milestoneId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "customFieldValues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "value": {}
                      },
                      "required": [
                        "fieldUlid"
                      ]
                    }
                  },
                  "planUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "configurationUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "maxItems": 20
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Run created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Runs"
        ],
        "operationId": "listRuns",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Case-insensitive substring search"
            },
            "required": false,
            "description": "Case-insensitive substring search",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated projected statuses: in_progress, passed, failed, aborted"
            },
            "required": false,
            "description": "Comma-separated projected statuses: in_progress, passed, failed, aborted",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Repeatable exact environment value. Values may contain commas; repeat the parameter for multiple environments."
            },
            "required": false,
            "description": "Repeatable exact environment value. Values may contain commas; repeat the parameter for multiple environments.",
            "name": "env",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "description": "Filter to runs authored by this user ULID"
            },
            "required": false,
            "description": "Filter to runs authored by this user ULID",
            "name": "authorUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Default assignee user ULID, or assigneeUlid=empty for runs without a default assignee"
            },
            "required": false,
            "description": "Default assignee user ULID, or assigneeUlid=empty for runs without a default assignee",
            "name": "assigneeUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Repeatable custom-field filters: <fieldUlid>:<value[,value…]> (option ULIDs, true/false, user ULID, or empty)"
            },
            "required": false,
            "description": "Repeatable custom-field filters: <fieldUlid>:<value[,value…]> (option ULIDs, true/false, user ULID, or empty)",
            "name": "cf",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Runs page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "environment": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "name",
                              "slug"
                            ]
                          },
                          "environmentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "environmentName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "defaultAssigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "open",
                              "closed"
                            ]
                          },
                          "startedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "finishedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "closedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "abortedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "untested",
                              "retested",
                              "passed",
                              "failed",
                              "skipped",
                              "blocked"
                            ]
                          },
                          "total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "executed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "passRate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "author": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "displayName": {
                                    "type": "string"
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "displayName",
                                  "avatarKey"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "counts": {
                            "type": "object",
                            "properties": {
                              "passed": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "failed": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "blocked": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "skipped": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "untested": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "retested": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "passed",
                              "failed",
                              "blocked",
                              "skipped",
                              "untested"
                            ]
                          },
                          "firstResultAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "lastResultAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "totalDurationMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "estimate": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "milestoneId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "milestone": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "name"
                            ]
                          },
                          "configurations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "configurationUlid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "groupName": {
                                  "type": "string"
                                },
                                "valueName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "configurationUlid",
                                "groupName",
                                "valueName"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "name",
                          "description",
                          "environment",
                          "environmentId",
                          "environmentName",
                          "defaultAssigneeUlid",
                          "state",
                          "startedAt",
                          "finishedAt",
                          "closedAt",
                          "abortedAt",
                          "status",
                          "total",
                          "executed",
                          "passRate",
                          "author",
                          "counts",
                          "firstResultAt",
                          "lastResultAt",
                          "totalDurationMs",
                          "estimate",
                          "milestoneId",
                          "milestone",
                          "configurations"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/runs/environments": {
      "get": {
        "tags": [
          "Runs"
        ],
        "operationId": "listRunEnvironments",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Distinct run environments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/suites/{suiteUlid}": {
      "get": {
        "tags": [
          "Suites"
        ],
        "operationId": "getSuite",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "suiteUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Suite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "suiteNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "parentUlid",
                    "name",
                    "description",
                    "suiteNumber",
                    "displayId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Suites"
        ],
        "operationId": "updateSuite",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "suiteUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "parentUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated suite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*$"
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "suiteNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectId",
                    "parentUlid",
                    "name",
                    "description",
                    "suiteNumber",
                    "displayId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Suites"
        ],
        "operationId": "deleteSuite",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "suiteUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "deleteCases",
                "moveToParent"
              ]
            },
            "required": false,
            "name": "caseDisposition",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Suite deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/suites/{suiteUlid}/subtree-case-counts": {
      "get": {
        "tags": [
          "Suites"
        ],
        "operationId": "getSuiteSubtreeCaseCounts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "suiteUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Subtree case counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "archived": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "active",
                    "archived",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}": {
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "getTestCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Test case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    },
                    "archivedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "suiteUlid",
                    "caseNumber",
                    "displayId",
                    "title",
                    "description",
                    "milestoneUlid",
                    "tags",
                    "steps",
                    "customFieldValues",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Test cases"
        ],
        "operationId": "updateTestCase",
        "summary": "Update test case",
        "description": "Consolidated partial update for fields, steps, and custom field values. Requires organization role owner, admin, or member; viewers receive 403 before any write.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "patch": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 400
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 4000
                      },
                      "suiteUlid": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "milestoneUlid": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                      },
                      "tags": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "maxItems": 50
                      }
                    },
                    "additionalProperties": false
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "action": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "data": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "expected": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "objectKey": {
                                "type": "string",
                                "minLength": 1
                              },
                              "thumbKey": {
                                "type": "string",
                                "minLength": 1
                              },
                              "mime": {
                                "type": "string",
                                "enum": [
                                  "image/png",
                                  "image/jpeg",
                                  "image/webp"
                                ]
                              },
                              "byteSize": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "width": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "height": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "originalFilename": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "ulid",
                              "position"
                            ]
                          },
                          "maxItems": 50
                        }
                      },
                      "required": [
                        "position",
                        "action"
                      ]
                    },
                    "maxItems": 500
                  },
                  "customFieldValues": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "value": {}
                      },
                      "required": [
                        "fieldUlid"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated test case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    },
                    "archivedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "suiteUlid",
                    "caseNumber",
                    "displayId",
                    "title",
                    "description",
                    "milestoneUlid",
                    "tags",
                    "steps",
                    "customFieldValues",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Test cases"
        ],
        "operationId": "deleteTestCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Test case deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/defects": {
      "get": {
        "tags": [
          "Defects"
        ],
        "operationId": "listTestCaseDefectSuggestions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Defects previously linked to this test case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "defectNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "in_progress",
                              "resolved",
                              "closed"
                            ]
                          },
                          "resolution": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "fixed",
                              "wont_fix",
                              "duplicate",
                              "cannot_reproduce",
                              null
                            ]
                          },
                          "reporterUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "assigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "tags": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            }
                          },
                          "milestoneUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "duplicateOfUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "resolvedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "closedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "occurrenceCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "lastSeenAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "systemFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "defectNumber",
                          "title",
                          "description",
                          "status",
                          "resolution",
                          "reporterUlid",
                          "assigneeUlid",
                          "tags",
                          "milestoneUlid",
                          "duplicateOfUlid",
                          "resolvedAt",
                          "closedAt",
                          "createdAt",
                          "updatedAt",
                          "occurrenceCount",
                          "lastSeenAt",
                          "systemFieldValues"
                        ]
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/archive": {
      "post": {
        "tags": [
          "Test cases"
        ],
        "operationId": "archiveTestCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Archived test case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    },
                    "archivedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "suiteUlid",
                    "caseNumber",
                    "displayId",
                    "title",
                    "description",
                    "milestoneUlid",
                    "tags",
                    "steps",
                    "customFieldValues",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/unarchive": {
      "post": {
        "tags": [
          "Test cases"
        ],
        "operationId": "unarchiveTestCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Unarchived test case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    },
                    "archivedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "suiteUlid",
                    "caseNumber",
                    "displayId",
                    "title",
                    "description",
                    "milestoneUlid",
                    "tags",
                    "steps",
                    "customFieldValues",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/steps": {
      "get": {
        "tags": [
          "Test cases"
        ],
        "operationId": "getTestCaseSteps",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Steps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    }
                  },
                  "required": [
                    "steps"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Test cases"
        ],
        "operationId": "replaceTestCaseSteps",
        "summary": "Replace all steps (optional attachments per step)",
        "description": "Each step may include an `attachments` array. New images reference staged object keys under `staging/<orgUlid>/` returned from `POST .../step-attachments:stage`; committed images use permanent keys under `attachments/<orgUlid>/...`. Omitted attachment ULIDs are deleted.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "action": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "data": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "expected": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "objectKey": {
                                "type": "string",
                                "minLength": 1
                              },
                              "thumbKey": {
                                "type": "string",
                                "minLength": 1
                              },
                              "mime": {
                                "type": "string",
                                "enum": [
                                  "image/png",
                                  "image/jpeg",
                                  "image/webp"
                                ]
                              },
                              "byteSize": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "width": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "height": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "originalFilename": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "ulid",
                              "position"
                            ]
                          },
                          "maxItems": 50
                        }
                      },
                      "required": [
                        "position",
                        "action"
                      ]
                    },
                    "maxItems": 500
                  }
                },
                "required": [
                  "steps"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replaced steps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "action": {
                            "type": "string"
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename",
                                "position"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "attachments"
                        ]
                      }
                    }
                  },
                  "required": [
                    "steps"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/step-attachments:stage": {
      "post": {
        "tags": [
          "Test cases"
        ],
        "operationId": "stageTestCaseStepAttachments",
        "summary": "Stage step images before save",
        "description": "Validates and processes each image (WebP full + thumbnail under `staging/<orgUlid>/`). Creates no database rows. Commit by including the returned refs on step save (`POST .../test-cases` or `PUT .../steps`).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "description": "PNG, JPEG, or WebP (max 10 MiB each)"
                    },
                    "minItems": 1,
                    "maxItems": 10,
                    "description": "One or more `file` parts (max 10 per request)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Staged attachment refs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "enum": [
                              "image/png",
                              "image/jpeg",
                              "image/webp"
                            ]
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "width": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "width",
                          "height",
                          "originalFilename"
                        ]
                      }
                    }
                  },
                  "required": [
                    "attachments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/step-attachments/{attachmentUlid}": {
      "delete": {
        "tags": [
          "Test cases"
        ],
        "operationId": "deleteTestCaseStepAttachment",
        "summary": "Delete a committed step attachment",
        "description": "Removes the attachment row and its permanent R2 objects. To drop images while editing steps in bulk, omit them from the step `attachments` array on `PUT .../steps` instead.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "attachmentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Attachment deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Attachment or case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/custom-field-values": {
      "put": {
        "tags": [
          "Test cases"
        ],
        "operationId": "replaceTestCaseCustomFieldValues",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "value": {}
                      },
                      "required": [
                        "fieldUlid"
                      ]
                    }
                  }
                },
                "required": [
                  "values"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replaced custom field values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/custom-field-values/{fieldUlid}": {
      "patch": {
        "tags": [
          "Test cases"
        ],
        "operationId": "patchTestCaseCustomFieldValue",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "fieldUlid",
            "in": "path",
            "description": "ULID of the custom field definition to mutate."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {}
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated custom field values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/comments": {
      "get": {
        "tags": [
          "Test Cases"
        ],
        "operationId": "listTestCaseComments",
        "summary": "List test-case comments",
        "description": "Cursor pagination over top-level comments (`parentUlid` absent). Add `?sort=newest` to reverse the order; default is `oldest` (unchanged). Each item carries its `replyCount` and inline `replies[]` (chronological ascending, capped at 100), resolved `mentions[]`, and `pinnedAt`/`pinnedBy` when pinned. The response `pinned[]` sibling holds the complete pinned top-level set for the entity, ordered by `pinnedAt` ascending, independent of the paginated `items` cursor. Viewers may list; only members and above may create, edit, delete, or pin/unpin.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest"
              ],
              "default": "oldest"
            },
            "required": false,
            "name": "sort",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Comment page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          },
                          "replyCount": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                          },
                          "replies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "author": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "editedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "disposition": {
                                        "type": "string",
                                        "enum": [
                                          "inline",
                                          "attachment"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "uploadedBy": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "displayName": {
                                            "type": "string"
                                          },
                                          "avatarKey": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "avatarVersion": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "positionTitle": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "default": null
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "displayName",
                                          "avatarKey",
                                          "avatarVersion"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbUrl": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "createdAt": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "disposition",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "uploadedBy",
                                      "url",
                                      "thumbUrl",
                                      "createdAt"
                                    ]
                                  },
                                  "default": []
                                },
                                "parentUlid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                                  "default": null
                                },
                                "pinnedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "default": null
                                },
                                "pinnedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "default": null,
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "mentions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "displayName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "displayName"
                                    ]
                                  },
                                  "default": []
                                }
                              },
                              "required": [
                                "ulid",
                                "body",
                                "author",
                                "createdAt",
                                "editedAt"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "pinned": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          },
                          "replyCount": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                          },
                          "replies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "body": {
                                  "type": "string"
                                },
                                "author": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "editedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "attachments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "objectKey": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbKey": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "mime": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "byteSize": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "disposition": {
                                        "type": "string",
                                        "enum": [
                                          "inline",
                                          "attachment"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "height": {
                                        "type": [
                                          "integer",
                                          "null"
                                        ],
                                        "exclusiveMinimum": 0
                                      },
                                      "originalFilename": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "maxLength": 255
                                      },
                                      "uploadedBy": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "displayName": {
                                            "type": "string"
                                          },
                                          "avatarKey": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "avatarVersion": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "positionTitle": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "default": null
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "displayName",
                                          "avatarKey",
                                          "avatarVersion"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "thumbUrl": {
                                        "type": [
                                          "string",
                                          "null"
                                        ],
                                        "minLength": 1
                                      },
                                      "createdAt": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "objectKey",
                                      "thumbKey",
                                      "mime",
                                      "byteSize",
                                      "disposition",
                                      "width",
                                      "height",
                                      "originalFilename",
                                      "uploadedBy",
                                      "url",
                                      "thumbUrl",
                                      "createdAt"
                                    ]
                                  },
                                  "default": []
                                },
                                "parentUlid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                                  "default": null
                                },
                                "pinnedAt": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "default": null
                                },
                                "pinnedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "default": null,
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "mentions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "displayName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "displayName"
                                    ]
                                  },
                                  "default": []
                                }
                              },
                              "required": [
                                "ulid",
                                "body",
                                "author",
                                "createdAt",
                                "editedAt"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Test case not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Test Cases"
        ],
        "operationId": "createTestCaseComment",
        "summary": "Create a test-case comment",
        "description": "Body is trimmed and may be empty when at least one attachment is present (image-only comments); whitespace-only text with no attachments returns 422. Max 5000 characters. Set `parentUlid` to create a depth-1 reply under an existing top-level comment on the same test case; replying to a reply returns `422 validation_failed`, and a `parentUlid` from another entity or organization returns `404 not_found`. Replies do NOT appear in the flat `items[]` enumeration of the listing endpoint — they are only reachable via their parent's `replies[]`. Emits `test_case.commented` with a 140-character excerpt. Viewers receive 403.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "objectKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "thumbKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "mime": {
                          "type": "string",
                          "enum": [
                            "image/png",
                            "image/jpeg",
                            "image/webp"
                          ]
                        },
                        "byteSize": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "originalFilename": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "ulid",
                        "position"
                      ]
                    }
                  },
                  "parentUlid": {
                    "type": "string",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Test case, or the parentUlid comment, not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/comments/{commentUlid}": {
      "patch": {
        "tags": [
          "Test Cases"
        ],
        "operationId": "updateTestCaseComment",
        "summary": "Edit a test-case comment",
        "description": "Only the original author may edit. Body may be empty only while the comment keeps at least one attachment (image-only comments); an empty body with no attachments returns 422. Sets `editedAt` on success. Emits `test_case.comment_updated`. Admins cannot edit another member's comment (403).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "objectKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "thumbKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "mime": {
                          "type": "string",
                          "enum": [
                            "image/png",
                            "image/jpeg",
                            "image/webp"
                          ]
                        },
                        "byteSize": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "originalFilename": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "ulid",
                        "position"
                      ]
                    }
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or test case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Test Cases"
        ],
        "operationId": "deleteTestCaseComment",
        "summary": "Delete a test-case comment",
        "description": "Authors may delete their own comments. Organization admins may delete any comment. Other members receive 403. Deleting a top-level comment cascades to its replies, purging their attachments and emitting one `test_case.comment_deleted` per cascaded reply. Emits `test_case.comment_deleted`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Comment deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or test case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/test-cases/{caseUlid}/comments/{commentUlid}/pin": {
      "post": {
        "tags": [
          "Test Cases"
        ],
        "operationId": "pinTestCaseComment",
        "summary": "Pin a test-case comment",
        "description": "Pins a top-level comment so it renders in the `pinned[]` list ahead of the paginated feed, regardless of `sort`. Any member or above may pin any top-level comment; viewers receive 403. Pinning a reply (a comment with a non-null `parentUlid`) returns `422 validation_failed`. Sets `pinnedAt`/`pinnedBy` on the comment. No cap on the number of pinned comments per entity. Emits `test_case.comment_pinned`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Pinned comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or test case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Test Cases"
        ],
        "operationId": "unpinTestCaseComment",
        "summary": "Unpin a test-case comment",
        "description": "Clears `pinnedAt`/`pinnedBy` on a previously pinned top-level comment. Any member or above may unpin; viewers receive 403. Unpinning an already-unpinned comment is idempotent (no additional audit event). Unpinning a reply (a comment with a non-null `parentUlid`) returns `422 validation_failed`. Emits `test_case.comment_unpinned`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "caseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "commentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Unpinned comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "body": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "editedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "uploadedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "disposition",
                          "width",
                          "height",
                          "originalFilename",
                          "uploadedBy",
                          "url",
                          "thumbUrl",
                          "createdAt"
                        ]
                      },
                      "default": []
                    },
                    "parentUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                      "default": null
                    },
                    "pinnedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "pinnedBy": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "default": null,
                      "required": [
                        "ulid",
                        "displayName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "displayName"
                        ]
                      },
                      "default": []
                    },
                    "replyCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "body": {
                            "type": "string"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "editedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "disposition": {
                                  "type": "string",
                                  "enum": [
                                    "inline",
                                    "attachment"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "uploadedBy": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "ulid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "displayName": {
                                      "type": "string"
                                    },
                                    "avatarKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "avatarVersion": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "positionTitle": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "ulid",
                                    "displayName",
                                    "avatarKey",
                                    "avatarVersion"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "ulid",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "disposition",
                                "width",
                                "height",
                                "originalFilename",
                                "uploadedBy",
                                "url",
                                "thumbUrl",
                                "createdAt"
                              ]
                            },
                            "default": []
                          },
                          "parentUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                            "default": null
                          },
                          "pinnedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0,
                            "default": null
                          },
                          "pinnedBy": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "positionTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "default": null
                              }
                            },
                            "default": null,
                            "required": [
                              "ulid",
                              "displayName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "displayName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "displayName"
                              ]
                            },
                            "default": []
                          }
                        },
                        "required": [
                          "ulid",
                          "body",
                          "author",
                          "createdAt",
                          "editedAt"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "ulid",
                    "body",
                    "author",
                    "createdAt",
                    "editedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Comment or test case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}": {
      "get": {
        "tags": [
          "Runs"
        ],
        "operationId": "getRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    },
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations",
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Runs"
        ],
        "operationId": "updateRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "defaultAssigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "environmentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "milestoneId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "configurationUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "maxItems": 20
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Runs"
        ],
        "operationId": "deleteRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Run and dependent rows deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/custom-field-values": {
      "put": {
        "tags": [
          "Runs"
        ],
        "operationId": "replaceRunCustomFieldValues",
        "summary": "Replace a run’s custom field values",
        "description": "Atomically replaces the custom field values visible for the run's project (entity `test_run`). A visible field omitted from the body has its stored row deleted; a stored row for a field no longer visible for the run's project is left untouched. Folds the change into the run's existing `run.updated` audit event — no standalone `custom_field` event is emitted.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "value": {}
                      },
                      "required": [
                        "fieldUlid"
                      ]
                    }
                  }
                },
                "required": [
                  "values"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replaced custom field values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customFieldValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fieldUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionIcon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionColor": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "optionSystemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fieldUlid",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "customFieldValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Run not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Run is aborted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases": {
      "patch": {
        "tags": [
          "Runs"
        ],
        "operationId": "reconcileRunCases",
        "summary": "Reconcile an open run's case selection",
        "description": "Reconciles an open run's case selection to the supplied desired full selection (case ULIDs plus a per-case assignee map). Diffs it against the run's current cases and applies adds, removes, and assignee changes atomically in one transaction. Emits run.case_added / run.case_removed / run.case_assigned for exactly the computed delta.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "caseAssignees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "caseUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "assigneeUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        }
                      },
                      "required": [
                        "caseUlid",
                        "assigneeUlid"
                      ]
                    }
                  }
                },
                "required": [
                  "caseUlids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reconciled run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Run is closed or aborted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Run cases"
        ],
        "operationId": "listRunCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Run cases",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "runUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseNumber": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "titleSnapshot": {
                            "type": "string",
                            "minLength": 1
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "precondition": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postcondition": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "priority": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "assigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "untested",
                              "retested",
                              "passed",
                              "failed",
                              "skipped",
                              "blocked"
                            ]
                          },
                          "elapsedMs": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "stepTotal": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "stepExecuted": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "resultUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseLifecycleStatus": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "optionName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "optionIcon": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "optionColor": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "optionSystemKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "optionName",
                              "optionIcon",
                              "optionColor",
                              "optionSystemKey"
                            ]
                          },
                          "retestCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "resultNotes": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resultAttachmentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "runUlid",
                          "caseUlid",
                          "caseNumber",
                          "titleSnapshot",
                          "suiteUlid",
                          "suiteName",
                          "description",
                          "precondition",
                          "postcondition",
                          "priority",
                          "assigneeUlid",
                          "status",
                          "elapsedMs",
                          "position",
                          "stepTotal",
                          "stepExecuted",
                          "resultUlid"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "addRunCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "caseUlids"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Cases added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "added": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "added"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/results": {
      "get": {
        "tags": [
          "Results"
        ],
        "operationId": "listRunResults",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Results page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "runUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "passed",
                              "failed",
                              "skipped",
                              "blocked"
                            ]
                          },
                          "durationMs": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "notes": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "executedByUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "executedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "hasSnapshot": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "ulid",
                          "runUlid",
                          "caseUlid",
                          "status",
                          "durationMs",
                          "notes",
                          "executedByUlid",
                          "executedAt",
                          "hasSnapshot"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/results/{resultUlid}": {
      "get": {
        "tags": [
          "Results"
        ],
        "operationId": "getRunResultSnapshot",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "resultUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Frozen attempt snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "runUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "caseUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "passed",
                            "failed",
                            "skipped",
                            "blocked"
                          ]
                        },
                        "durationMs": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "notes": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "executedByUlid": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "executedAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "hasSnapshot": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "ulid",
                        "runUlid",
                        "caseUlid",
                        "status",
                        "durationMs",
                        "notes",
                        "executedByUlid",
                        "executedAt",
                        "hasSnapshot"
                      ]
                    },
                    "case": {
                      "type": "object",
                      "properties": {
                        "runCaseUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "caseNumber": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "exclusiveMinimum": 0
                        },
                        "titleSnapshot": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "precondition": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "postcondition": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "priority": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "runCaseUlid",
                        "caseNumber",
                        "titleSnapshot",
                        "description",
                        "precondition",
                        "postcondition",
                        "priority"
                      ]
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "runCaseStepUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "action": {
                            "type": "string",
                            "minLength": 1
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "untested",
                              "retested",
                              "passed",
                              "failed",
                              "skipped",
                              "blocked"
                            ]
                          },
                          "actualResult": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "snapshotId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                }
                              },
                              "required": [
                                "ulid",
                                "position",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "runCaseStepUlid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "status",
                          "actualResult",
                          "attachments"
                        ]
                      }
                    },
                    "legacy": {
                      "type": "boolean"
                    },
                    "resultAttachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "originalFilename": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "position",
                          "mime",
                          "byteSize",
                          "originalFilename",
                          "disposition",
                          "thumbKey",
                          "width",
                          "height"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "result",
                    "case",
                    "steps",
                    "legacy"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Run or result not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/close": {
      "post": {
        "tags": [
          "Runs"
        ],
        "operationId": "closeRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Closed run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/abort": {
      "post": {
        "tags": [
          "Runs"
        ],
        "operationId": "abortRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Aborted run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Run is already closed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/runs/{runUlid}/clone": {
      "post": {
        "tags": [
          "Runs"
        ],
        "operationId": "cloneRun",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "cloneAssignees": {
                    "type": "boolean",
                    "default": false
                  },
                  "statusFilter": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    }
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "\"Run again\" — new run cloned from the source run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "environment": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name",
                        "slug"
                      ]
                    },
                    "environmentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "environmentName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "defaultAssigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed"
                      ]
                    },
                    "startedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "closedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "abortedAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "passRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "blocked": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "skipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "untested": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "retested": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "blocked",
                        "skipped",
                        "untested"
                      ]
                    },
                    "firstResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "lastResultAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "totalDurationMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "estimate": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "milestoneId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ]
                    },
                    "configurations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "valueName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupName",
                          "valueName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "name",
                    "description",
                    "environment",
                    "environmentId",
                    "environmentName",
                    "defaultAssigneeUlid",
                    "state",
                    "startedAt",
                    "finishedAt",
                    "closedAt",
                    "abortedAt",
                    "status",
                    "total",
                    "executed",
                    "passRate",
                    "author",
                    "counts",
                    "firstResultAt",
                    "lastResultAt",
                    "totalDurationMs",
                    "estimate",
                    "milestoneId",
                    "milestone",
                    "configurations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/bulk-mark": {
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "bulkMarkRunCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "passed",
                      "failed",
                      "skipped",
                      "blocked"
                    ]
                  }
                },
                "required": [
                  "caseUlids",
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic bulk mark — one audit event, uniform { affected, unchanged } counters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "affected": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "affected",
                    "unchanged"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/bulk-assign": {
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "bulkAssignRunCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  },
                  "assigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "caseUlids",
                  "assigneeUlid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic bulk assign",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "affected": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "affected",
                    "unchanged"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/bulk-retry": {
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "bulkRetryRunCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                },
                "required": [
                  "caseUlids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic bulk retry to untested",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "affected": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "affected",
                    "unchanged"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/bulk-remove": {
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "bulkRemoveRunCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                },
                "required": [
                  "caseUlids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic bulk remove from run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "affected": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "affected",
                    "unchanged"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}": {
      "get": {
        "tags": [
          "Run cases"
        ],
        "operationId": "getRunCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Run case with snapshot steps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "runUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "exclusiveMinimum": 0
                    },
                    "titleSnapshot": {
                      "type": "string",
                      "minLength": 1
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "precondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "postcondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "priority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "elapsedMs": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepTotal": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepExecuted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "resultUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseLifecycleStatus": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "optionName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionIcon": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionColor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionSystemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "optionName",
                        "optionIcon",
                        "optionColor",
                        "optionSystemKey"
                      ]
                    },
                    "retestCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "resultNotes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resultAttachmentCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "runCaseUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "action": {
                            "type": "string",
                            "minLength": 1
                          },
                          "data": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expected": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "untested",
                              "retested",
                              "passed",
                              "failed",
                              "skipped",
                              "blocked"
                            ]
                          },
                          "defectRef": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "actualResult": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "objectKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "thumbKey": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "mime": {
                                  "type": "string",
                                  "enum": [
                                    "image/png",
                                    "image/jpeg",
                                    "image/webp"
                                  ]
                                },
                                "byteSize": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "originalFilename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "maxLength": 255
                                },
                                "snapshotId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                }
                              },
                              "required": [
                                "ulid",
                                "position",
                                "objectKey",
                                "thumbKey",
                                "mime",
                                "byteSize",
                                "width",
                                "height",
                                "originalFilename"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "runCaseUlid",
                          "position",
                          "action",
                          "data",
                          "expected",
                          "status",
                          "defectRef",
                          "actualResult",
                          "attachments"
                        ]
                      }
                    },
                    "linkedDefects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "defectNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "title": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "in_progress",
                              "resolved",
                              "closed"
                            ]
                          },
                          "assigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "required": [
                          "ulid",
                          "defectNumber",
                          "title",
                          "status"
                        ]
                      }
                    },
                    "resultAttachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "originalFilename": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "disposition": {
                            "type": "string",
                            "enum": [
                              "inline",
                              "attachment"
                            ]
                          },
                          "thumbKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "position",
                          "mime",
                          "byteSize",
                          "originalFilename",
                          "disposition",
                          "thumbKey",
                          "width",
                          "height"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "ulid",
                    "runUlid",
                    "caseUlid",
                    "caseNumber",
                    "titleSnapshot",
                    "suiteUlid",
                    "suiteName",
                    "description",
                    "precondition",
                    "postcondition",
                    "priority",
                    "assigneeUlid",
                    "status",
                    "elapsedMs",
                    "position",
                    "stepTotal",
                    "stepExecuted",
                    "resultUlid",
                    "steps",
                    "linkedDefects"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Run cases"
        ],
        "operationId": "patchRunCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "passed",
                      "failed",
                      "skipped",
                      "blocked"
                    ]
                  },
                  "elapsedMs": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated run case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "runUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "exclusiveMinimum": 0
                    },
                    "titleSnapshot": {
                      "type": "string",
                      "minLength": 1
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "precondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "postcondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "priority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "elapsedMs": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepTotal": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepExecuted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "resultUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseLifecycleStatus": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "optionName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionIcon": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionColor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionSystemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "optionName",
                        "optionIcon",
                        "optionColor",
                        "optionSystemKey"
                      ]
                    },
                    "retestCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "resultNotes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resultAttachmentCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "runUlid",
                    "caseUlid",
                    "caseNumber",
                    "titleSnapshot",
                    "suiteUlid",
                    "suiteName",
                    "description",
                    "precondition",
                    "postcondition",
                    "priority",
                    "assigneeUlid",
                    "status",
                    "elapsedMs",
                    "position",
                    "stepTotal",
                    "stepExecuted",
                    "resultUlid"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Run cases"
        ],
        "operationId": "removeRunCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}/open": {
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "openRunCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Run case (auto-assigned on open)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "runUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "exclusiveMinimum": 0
                    },
                    "titleSnapshot": {
                      "type": "string",
                      "minLength": 1
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "precondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "postcondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "priority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "elapsedMs": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepTotal": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepExecuted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "resultUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseLifecycleStatus": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "optionName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionIcon": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionColor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionSystemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "optionName",
                        "optionIcon",
                        "optionColor",
                        "optionSystemKey"
                      ]
                    },
                    "retestCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "resultNotes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resultAttachmentCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "runUlid",
                    "caseUlid",
                    "caseNumber",
                    "titleSnapshot",
                    "suiteUlid",
                    "suiteName",
                    "description",
                    "precondition",
                    "postcondition",
                    "priority",
                    "assigneeUlid",
                    "status",
                    "elapsedMs",
                    "position",
                    "stepTotal",
                    "stepExecuted",
                    "resultUlid"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}/steps/{stepUlid}": {
      "patch": {
        "tags": [
          "Run cases"
        ],
        "operationId": "markRunCaseStep",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "stepUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "passed",
                      "failed",
                      "skipped",
                      "blocked"
                    ]
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Step marked; aggregated case status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "caseStatus": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "caseStatus"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}/retry": {
      "post": {
        "tags": [
          "Run cases"
        ],
        "operationId": "retryRunCase",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Run case reset to untested",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "runUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseNumber": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "exclusiveMinimum": 0
                    },
                    "titleSnapshot": {
                      "type": "string",
                      "minLength": 1
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "precondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "postcondition": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "priority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "untested",
                        "retested",
                        "passed",
                        "failed",
                        "skipped",
                        "blocked"
                      ]
                    },
                    "elapsedMs": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepTotal": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stepExecuted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "resultUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseLifecycleStatus": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "optionName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionIcon": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionColor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "optionSystemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "optionName",
                        "optionIcon",
                        "optionColor",
                        "optionSystemKey"
                      ]
                    },
                    "retestCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "resultNotes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resultAttachmentCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "runUlid",
                    "caseUlid",
                    "caseNumber",
                    "titleSnapshot",
                    "suiteUlid",
                    "suiteName",
                    "description",
                    "precondition",
                    "postcondition",
                    "priority",
                    "assigneeUlid",
                    "status",
                    "elapsedMs",
                    "position",
                    "stepTotal",
                    "stepExecuted",
                    "resultUlid"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}/steps/{stepUlid}/result-attachments:stage": {
      "post": {
        "tags": [
          "Run result attachments"
        ],
        "operationId": "stageRunResultAttachments",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "stepUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "description": "One or more image files"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Staged attachment refs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "thumbKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "mime": {
                            "type": "string",
                            "enum": [
                              "image/png",
                              "image/jpeg",
                              "image/webp"
                            ]
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "width": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "originalFilename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "ulid",
                          "objectKey",
                          "thumbKey",
                          "mime",
                          "byteSize",
                          "width",
                          "height",
                          "originalFilename"
                        ]
                      }
                    }
                  },
                  "required": [
                    "attachments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}/steps/{stepUlid}/result": {
      "patch": {
        "tags": [
          "Run result attachments"
        ],
        "operationId": "saveStepActualResult",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "stepUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actualResult": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 20000
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "objectKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "thumbKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "mime": {
                          "type": "string",
                          "enum": [
                            "image/png",
                            "image/jpeg",
                            "image/webp"
                          ]
                        },
                        "byteSize": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "originalFilename": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "ulid",
                        "position"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Actual result persisted; attachments reconciled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "actualResult": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "actualResult"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/cases/{runCaseUlid}/steps/{stepUlid}/result-attachments/{attachmentUlid}": {
      "delete": {
        "tags": [
          "Run result attachments"
        ],
        "operationId": "deleteRunResultAttachment",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runCaseUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "stepUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "attachmentUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Attachment removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/custom-fields": {
      "get": {
        "tags": [
          "Custom fields"
        ],
        "operationId": "listOrgCustomFields",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Case-insensitive substring search"
            },
            "required": false,
            "description": "Case-insensitive substring search",
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Organization custom field definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "group": {
                            "type": "string",
                            "enum": [
                              "system",
                              "custom"
                            ]
                          },
                          "entity": {
                            "type": "string",
                            "enum": [
                              "test_case",
                              "test_run",
                              "defect"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "number",
                              "short_text",
                              "paragraph",
                              "select_single",
                              "checkbox",
                              "radio",
                              "select_multi",
                              "user_picker",
                              "url",
                              "date_picker"
                            ]
                          },
                          "placeholder": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "defaultValue": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isRequired": {
                            "type": "boolean"
                          },
                          "allProjects": {
                            "type": "boolean"
                          },
                          "projectUlids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            }
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "icon": {
                                  "type": "string",
                                  "maxLength": 120,
                                  "default": ""
                                },
                                "color": {
                                  "type": "string",
                                  "pattern": "^#[0-9A-Fa-f]{6}$",
                                  "default": "#000000"
                                },
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "position": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "ulid",
                                "position"
                              ]
                            }
                          },
                          "groupLabel": {
                            "type": "string"
                          },
                          "entityLabel": {
                            "type": "string"
                          },
                          "typeLabel": {
                            "type": "string"
                          },
                          "projectsSummary": {
                            "type": "string"
                          },
                          "systemKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "ulid",
                          "title",
                          "group",
                          "entity",
                          "type",
                          "placeholder",
                          "defaultValue",
                          "isRequired",
                          "allProjects",
                          "projectUlids",
                          "options",
                          "groupLabel",
                          "entityLabel",
                          "typeLabel",
                          "projectsSummary"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Custom fields"
        ],
        "operationId": "createOrgCustomField",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "entity": {
                    "type": "string",
                    "enum": [
                      "test_case",
                      "defect",
                      "test_run"
                    ],
                    "default": "test_case"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "number",
                      "short_text",
                      "paragraph",
                      "select_single",
                      "checkbox",
                      "radio",
                      "select_multi",
                      "user_picker",
                      "url",
                      "date_picker"
                    ]
                  },
                  "placeholder": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "defaultValue": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "isRequired": {
                    "type": "boolean",
                    "default": false
                  },
                  "allProjects": {
                    "type": "boolean",
                    "default": true
                  },
                  "projectUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "default": []
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "icon": {
                          "type": "string",
                          "maxLength": 120,
                          "default": ""
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9A-Fa-f]{6}$",
                          "default": "#000000"
                        }
                      },
                      "required": [
                        "name"
                      ]
                    },
                    "default": []
                  }
                },
                "required": [
                  "title",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created custom field",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "title": {
                          "type": "string"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "system",
                            "custom"
                          ]
                        },
                        "entity": {
                          "type": "string",
                          "enum": [
                            "test_case",
                            "test_run",
                            "defect"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "number",
                            "short_text",
                            "paragraph",
                            "select_single",
                            "checkbox",
                            "radio",
                            "select_multi",
                            "user_picker",
                            "url",
                            "date_picker"
                          ]
                        },
                        "placeholder": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "defaultValue": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "isRequired": {
                          "type": "boolean"
                        },
                        "allProjects": {
                          "type": "boolean"
                        },
                        "projectUlids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "icon": {
                                "type": "string",
                                "maxLength": 120,
                                "default": ""
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[0-9A-Fa-f]{6}$",
                                "default": "#000000"
                              },
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "systemKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "ulid",
                              "position"
                            ]
                          }
                        },
                        "groupLabel": {
                          "type": "string"
                        },
                        "entityLabel": {
                          "type": "string"
                        },
                        "typeLabel": {
                          "type": "string"
                        },
                        "projectsSummary": {
                          "type": "string"
                        },
                        "systemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ulid",
                        "title",
                        "group",
                        "entity",
                        "type",
                        "placeholder",
                        "defaultValue",
                        "isRequired",
                        "allProjects",
                        "projectUlids",
                        "options",
                        "groupLabel",
                        "entityLabel",
                        "typeLabel",
                        "projectsSummary"
                      ]
                    }
                  },
                  "required": [
                    "field"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/custom-fields/{fieldUlid}": {
      "patch": {
        "tags": [
          "Custom fields"
        ],
        "operationId": "updateOrgCustomField",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "fieldUlid",
            "in": "path",
            "description": "ULID of the custom field definition to mutate."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "entity": {
                    "type": "string",
                    "enum": [
                      "test_case",
                      "test_run",
                      "defect"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "number",
                      "short_text",
                      "paragraph",
                      "select_single",
                      "checkbox",
                      "radio",
                      "select_multi",
                      "user_picker",
                      "url",
                      "date_picker"
                    ]
                  },
                  "placeholder": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "defaultValue": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "isRequired": {
                    "type": "boolean"
                  },
                  "allProjects": {
                    "type": "boolean"
                  },
                  "projectUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "icon": {
                          "type": "string",
                          "maxLength": 120,
                          "default": ""
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9A-Fa-f]{6}$",
                          "default": "#000000"
                        },
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated custom field",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "title": {
                          "type": "string"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "system",
                            "custom"
                          ]
                        },
                        "entity": {
                          "type": "string",
                          "enum": [
                            "test_case",
                            "test_run",
                            "defect"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "number",
                            "short_text",
                            "paragraph",
                            "select_single",
                            "checkbox",
                            "radio",
                            "select_multi",
                            "user_picker",
                            "url",
                            "date_picker"
                          ]
                        },
                        "placeholder": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "defaultValue": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "isRequired": {
                          "type": "boolean"
                        },
                        "allProjects": {
                          "type": "boolean"
                        },
                        "projectUlids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "icon": {
                                "type": "string",
                                "maxLength": 120,
                                "default": ""
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[0-9A-Fa-f]{6}$",
                                "default": "#000000"
                              },
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "systemKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "ulid",
                              "position"
                            ]
                          }
                        },
                        "groupLabel": {
                          "type": "string"
                        },
                        "entityLabel": {
                          "type": "string"
                        },
                        "typeLabel": {
                          "type": "string"
                        },
                        "projectsSummary": {
                          "type": "string"
                        },
                        "systemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ulid",
                        "title",
                        "group",
                        "entity",
                        "type",
                        "placeholder",
                        "defaultValue",
                        "isRequired",
                        "allProjects",
                        "projectUlids",
                        "options",
                        "groupLabel",
                        "entityLabel",
                        "typeLabel",
                        "projectsSummary"
                      ]
                    }
                  },
                  "required": [
                    "field"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Custom fields"
        ],
        "operationId": "deleteOrgCustomField",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "fieldUlid",
            "in": "path",
            "description": "ULID of the custom field definition to mutate."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Custom field deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/custom-fields/{fieldUlid}/reset": {
      "post": {
        "tags": [
          "Custom fields"
        ],
        "operationId": "resetOrgSystemCustomField",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "fieldUlid",
            "in": "path",
            "description": "ULID of the custom field definition to mutate."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "System field restored to seed defaults (idempotent; project scope preserved; cascades values for removed options)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "object",
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "title": {
                          "type": "string"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "system",
                            "custom"
                          ]
                        },
                        "entity": {
                          "type": "string",
                          "enum": [
                            "test_case",
                            "test_run",
                            "defect"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "number",
                            "short_text",
                            "paragraph",
                            "select_single",
                            "checkbox",
                            "radio",
                            "select_multi",
                            "user_picker",
                            "url",
                            "date_picker"
                          ]
                        },
                        "placeholder": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "defaultValue": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "isRequired": {
                          "type": "boolean"
                        },
                        "allProjects": {
                          "type": "boolean"
                        },
                        "projectUlids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "icon": {
                                "type": "string",
                                "maxLength": 120,
                                "default": ""
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[0-9A-Fa-f]{6}$",
                                "default": "#000000"
                              },
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "systemKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "ulid",
                              "position"
                            ]
                          }
                        },
                        "groupLabel": {
                          "type": "string"
                        },
                        "entityLabel": {
                          "type": "string"
                        },
                        "typeLabel": {
                          "type": "string"
                        },
                        "projectsSummary": {
                          "type": "string"
                        },
                        "systemKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "ulid",
                        "title",
                        "group",
                        "entity",
                        "type",
                        "placeholder",
                        "defaultValue",
                        "isRequired",
                        "allProjects",
                        "projectUlids",
                        "options",
                        "groupLabel",
                        "entityLabel",
                        "typeLabel",
                        "projectsSummary"
                      ]
                    }
                  },
                  "required": [
                    "field"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/current": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "getCurrentOrganization",
        "summary": "Read the caller-bound organization",
        "description": "Echoes the organization bound to the caller’s token or session — never a client-supplied identifier. `state` is `active` or `suspended`; a suspended organization remains readable and exportable, but every other request against it is refused with `403 organization_suspended` until it is reactivated.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The caller’s bound organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended"
                      ]
                    }
                  },
                  "required": [
                    "ulid",
                    "name",
                    "state"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/members": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "listOrgMembers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Substring match on member email or name"
            },
            "required": false,
            "description": "Substring match on member email or name",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated member roles (owner, admin, member, viewer); values OR within the set"
            },
            "required": false,
            "description": "Comma-separated member roles (owner, admin, member, viewer); values OR within the set",
            "name": "role",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Organization members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ]
                          },
                          "joinedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "firstName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lastName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatarKey": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatarVersion": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "positionTitle": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "userUlid",
                          "email",
                          "role",
                          "joinedAt",
                          "firstName",
                          "lastName",
                          "avatarKey",
                          "avatarVersion"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/members/{userUlid}": {
      "patch": {
        "tags": [
          "Organizations"
        ],
        "operationId": "updateOrgMemberRole",
        "summary": "Change a member role",
        "description": "Changes a member role within the `owner > admin > member > viewer` rank ladder. Requires organization membership with role owner or admin. Two rank rules apply on top of last-owner protection: the actor cannot assign a role that outranks its own (so only an owner may grant the owner role), and the actor cannot modify a member whose current role outranks its own (so only an owner may modify another owner). Actions between members of equal rank are allowed. A request that violates a rank rule is rejected with 403 and no change is made.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "userUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "viewer"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated member",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "member": {
                      "type": "object",
                      "properties": {
                        "userUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "joinedAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "firstName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "lastName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarKey": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatarVersion": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "positionTitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "userUlid",
                        "email",
                        "role",
                        "joinedAt",
                        "firstName",
                        "lastName",
                        "avatarKey",
                        "avatarVersion"
                      ]
                    }
                  },
                  "required": [
                    "member"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "operationId": "removeOrgMember",
        "summary": "Remove a member",
        "description": "Removes a member from the organization. Requires organization membership with role owner or admin. The actor cannot remove a member whose current role outranks its own on the `owner > admin > member > viewer` rank ladder (so only an owner may remove another owner); such a request is rejected with 403. Last-owner protection still applies: the sole remaining owner cannot be removed.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "userUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Member removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/memberships/leave": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "operationId": "leaveOrganization",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Left organization"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/invitations": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "operationId": "listOrgInvitations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Substring match on invitee email"
            },
            "required": false,
            "description": "Substring match on invitee email",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated invitation statuses (pending, accepted, revoked, expired); values OR within the set"
            },
            "required": false,
            "description": "Comma-separated invitation statuses (pending, accepted, revoked, expired); values OR within the set",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated invitation roles (admin, member, viewer); values OR within the set"
            },
            "required": false,
            "description": "Comma-separated invitation roles (admin, member, viewer); values OR within the set",
            "name": "role",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation history page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "admin",
                              "member",
                              "viewer"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "revoked",
                              "expired"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "invitedBy": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "email": {
                                "type": "string",
                                "format": "email"
                              },
                              "firstName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "lastName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarKey": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "avatarVersion": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "ulid",
                              "email",
                              "firstName",
                              "lastName",
                              "avatarKey",
                              "avatarVersion"
                            ]
                          }
                        },
                        "required": [
                          "ulid",
                          "email",
                          "role",
                          "status",
                          "createdAt",
                          "expiresAt",
                          "invitedBy"
                        ]
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invitations"
        ],
        "operationId": "createOrgInvitation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member",
                      "viewer"
                    ]
                  },
                  "locale": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Invitation created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "ulid"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/storage-usage": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "getOrganizationStorageUsage",
        "summary": "Get the organization's storage usage and quota",
        "description": "Returns total bytes used, the effective quota (per-org override or global default), and per-category byte counters (result, run-result, defect, comment, and step attachments, plus avatars). Any authenticated member may call this.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Storage usage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalBytes": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "quotaBytes": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "categories": {
                      "type": "object",
                      "properties": {
                        "step_attachment": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "avatar": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "run_result_attachment": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "defect_attachment": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "comment_attachment": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "result_attachment": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "step_attachment",
                        "avatar",
                        "run_result_attachment",
                        "defect_attachment",
                        "comment_attachment",
                        "result_attachment"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "totalBytes",
                    "quotaBytes",
                    "categories"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/api-result-usage": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "getOrganizationApiResultUsage",
        "summary": "Get the organization's API result usage for the current period",
        "description": "Returns the organization's authoritative counted machine-authored results for the current calendar month (`periodKey`, opaque `YYYY-MM` UTC) alongside its effective `apiResultsPerMonth` ceiling. Never a recomputed count — the counter's own stored value. Reading usage never creates, resets, or advances the counter. A rolled period reports `0`. Any authenticated member may call this — no role gate.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "API result usage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "periodKey": {
                      "type": "string"
                    },
                    "used": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "periodKey",
                    "used",
                    "limit"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/attachments": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "listOrganizationAttachments",
        "summary": "List attachments across all 5 attachment surfaces for the organization",
        "description": "Unifies result, defect, comment, test-case step, and run-case step attachments (avatars excluded) into one server-side sorted, searched, and paginated listing. `isClosedRun` is true only for a run-result attachment whose parent run is closed. Any authenticated member may call this.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Case-insensitive substring match on filename or MIME type"
            },
            "required": false,
            "description": "Case-insensitive substring match on filename or MIME type",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "byteSize",
                "filename",
                "mime"
              ],
              "description": "Sort key across all 5 attachment surfaces combined; defaults to createdAt"
            },
            "required": false,
            "description": "Sort key across all 5 attachment surfaces combined; defaults to createdAt",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Sort direction; defaults to desc"
            },
            "required": false,
            "description": "Sort direction; defaults to desc",
            "name": "dir",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Unified attachment listing page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "result_attachment",
                              "run_result_attachment",
                              "defect_attachment",
                              "comment_attachment",
                              "step_attachment"
                            ]
                          },
                          "filename": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "mime": {
                            "type": "string",
                            "minLength": 1
                          },
                          "byteSize": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "objectKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "uploaderUserId": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "exclusiveMinimum": 0
                          },
                          "uploaderApiTokenUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "uploaderLabel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1
                          },
                          "isClosedRun": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "ulid",
                          "surface",
                          "filename",
                          "mime",
                          "byteSize",
                          "objectKey",
                          "createdAt",
                          "uploaderUserId",
                          "uploaderApiTokenUlid",
                          "uploaderLabel",
                          "isClosedRun"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/attachments:bulk-delete": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "operationId": "bulkDeleteOrganizationAttachments",
        "summary": "Bulk-delete attachments grouped by surface (owner/admin only)",
        "description": "Deletes the listed attachment ULIDs (grouped by their source surface) via the reusable per-surface delete paths, decrements the correct storage category counter for each, and emits one `organization.attachments_bulk_deleted` audit event for the whole batch. Overrides the closed-run immutability guard for run-result attachments in this selection. Tolerates partial R2 failure; a failed item still frees its row and counter. A single request may target at most 200 attachments in total across all surfaces; larger batches are rejected as a validation error. Restricted to organization owner/admin — other roles receive a forbidden error and no attachment is affected.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "object",
                    "properties": {
                      "result_attachment": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "minItems": 1,
                        "maxItems": 200
                      },
                      "run_result_attachment": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "minItems": 1,
                        "maxItems": 200
                      },
                      "defect_attachment": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "minItems": 1,
                        "maxItems": 200
                      },
                      "comment_attachment": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "minItems": 1,
                        "maxItems": 200
                      },
                      "step_attachment": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "minItems": 1,
                        "maxItems": 200
                      }
                    }
                  }
                },
                "required": [
                  "items"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item delete outcomes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "deleted",
                              "not_found",
                              "failed"
                            ]
                          }
                        },
                        "required": [
                          "ulid",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "results"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/invitations/{invitationUlid}": {
      "delete": {
        "tags": [
          "Invitations"
        ],
        "operationId": "revokeOrgInvitation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "invitationUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Invitation revoked"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/signup": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "signup",
        "summary": "Create account or complete repair",
        "description": "Creates a verified user with password credentials (CREATE), repairs an orphan user row (REPAIR), or returns a neutral collision envelope when the email already has credentials. CREATE and REPAIR require non-empty `firstName` and `lastName`.",
        "security": [],
        "requestBody": {
          "description": "Signup payload",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 254,
                    "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 256
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "invitationToken": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "email",
                  "password",
                  "firstName",
                  "lastName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CREATE/REPAIR: session cookie + user payload. COLLISION: `{ ok: true }` only.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "user": {
                          "type": "object",
                          "properties": {
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "email": {
                              "type": "string"
                            },
                            "isSuperadmin": {
                              "type": "boolean"
                            },
                            "emailVerifiedAt": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 0
                            }
                          },
                          "required": [
                            "ulid",
                            "email",
                            "isSuperadmin",
                            "emailVerifiedAt"
                          ]
                        },
                        "organizations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "owner",
                                  "admin",
                                  "member",
                                  "viewer"
                                ]
                              }
                            },
                            "required": [
                              "ulid",
                              "name",
                              "role"
                            ]
                          }
                        }
                      },
                      "required": [
                        "user",
                        "organizations"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "ok"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/profile": {
      "get": {
        "tags": [
          "Profile"
        ],
        "operationId": "getProfile",
        "summary": "Read the session user profile",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Profile fields for the authenticated user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "firstName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lastName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "positionTitle": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "firstName",
                    "lastName",
                    "positionTitle",
                    "avatarKey",
                    "avatarVersion"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Profile"
        ],
        "operationId": "updateProfile",
        "summary": "Update the session user profile",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "description": "Profile update",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "positionTitle": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "firstName",
                  "lastName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "firstName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lastName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "positionTitle": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "firstName",
                    "lastName",
                    "positionTitle",
                    "avatarKey",
                    "avatarVersion"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/profile/avatar": {
      "post": {
        "tags": [
          "Profile"
        ],
        "operationId": "uploadProfileAvatar",
        "summary": "Upload or replace the session user profile photo",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PNG, JPEG, or WebP (max 5 MiB)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated avatar reference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "avatarKey",
                    "avatarVersion"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Profile"
        ],
        "operationId": "deleteProfileAvatar",
        "summary": "Remove the session user profile photo",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar cleared",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "avatarKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatarVersion": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "avatarKey",
                    "avatarVersion"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/audit-events": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "listOrgAuditEvents",
        "summary": "List workspace audit events",
        "description": "Returns append-only audit events for the organization in reverse chronological order (ULID cursor). Requires organization membership with role owner or admin.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "actorUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "entityType",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Audit event page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "project.created",
                              "project.updated",
                              "project.trashed",
                              "project.restored",
                              "project.deleted",
                              "suite.created",
                              "suite.updated",
                              "suite.deleted",
                              "suite.moved",
                              "test_case.created",
                              "test_case.updated",
                              "test_case.archived",
                              "test_case.restored",
                              "test_case.deleted",
                              "test_case.moved",
                              "milestone.created",
                              "milestone.updated",
                              "milestone.deleted",
                              "custom_field.created",
                              "custom_field.updated",
                              "custom_field.deleted",
                              "custom_field.options_reordered",
                              "core_section.renamed",
                              "core_section.reset",
                              "member.role_changed",
                              "member.removed",
                              "invitation.sent",
                              "invitation.resent",
                              "invitation.revoked",
                              "invitation.accepted",
                              "api_token.created",
                              "api_token.revoked",
                              "run.created",
                              "run.updated",
                              "run.closed",
                              "run.aborted",
                              "run.reopened",
                              "run.deleted",
                              "run.case_step_actual_result_set",
                              "run.case_added",
                              "run.case_marked",
                              "run.case_step_marked",
                              "run.case_assigned",
                              "run.reran_failed",
                              "run.case_retried",
                              "run.case_removed",
                              "run.result_attachment_committed",
                              "run.result_attachment_deleted",
                              "run.cases_bulk_marked",
                              "run.cases_bulk_assigned",
                              "run.cases_bulk_retried",
                              "run.cases_bulk_removed",
                              "run.cases_bulk_result_submitted",
                              "run.cloned",
                              "defect.created",
                              "defect.updated",
                              "defect.status_changed",
                              "defect.reopened",
                              "defect.deleted",
                              "defect.linked",
                              "defect.unlinked",
                              "defect.attachment_added",
                              "defect.attachment_deleted",
                              "defect.commented",
                              "defect.comment_updated",
                              "defect.comment_deleted",
                              "defect.case_linked",
                              "defect.case_unlinked",
                              "defect.case_dismissed",
                              "test_case.commented",
                              "test_case.comment_updated",
                              "test_case.comment_deleted",
                              "test_case.comment_pinned",
                              "test_case.comment_unpinned",
                              "defect.comment_pinned",
                              "defect.comment_unpinned",
                              "environment.created",
                              "environment.updated",
                              "environment.deleted",
                              "milestone.status_changed",
                              "run.milestone_assigned",
                              "run.milestone_removed",
                              "configuration_group.created",
                              "configuration_group.updated",
                              "configuration_group.deleted",
                              "configuration.created",
                              "configuration.updated",
                              "configuration.deleted",
                              "test_plan.created",
                              "test_plan.updated",
                              "test_plan.deleted",
                              "test_plan.run_generated",
                              "test_plan.configurations_updated",
                              "test_plan.status_changed",
                              "test_plan.case_assignee_changed",
                              "organization.attachments_bulk_deleted",
                              "test_case.imported",
                              "test_case.cloned",
                              "suite.cloned",
                              "test_case.bulk_cloned",
                              "oauth_grant.created",
                              "oauth_grant.revoked"
                            ]
                          },
                          "actor": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "email": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "displayName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "firstName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "lastName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "avatarVersion": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "email",
                                  "displayName",
                                  "firstName",
                                  "lastName",
                                  "avatarKey",
                                  "avatarVersion"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "system"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind"
                                ]
                              }
                            ]
                          },
                          "entityType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "entityUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "entityLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "runUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "changes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "from": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "to": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "fromLabel": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "toLabel": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "from",
                                    "to"
                                  ]
                                }
                              },
                              "customFieldChanges": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "fieldUlid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "fieldLabel": {
                                      "type": "string"
                                    },
                                    "from": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "to": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "fieldUlid",
                                    "fieldLabel",
                                    "from",
                                    "to"
                                  ]
                                }
                              },
                              "stepsChange": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "replaced"
                                        ]
                                      },
                                      "previousCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "nextCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "previousCount",
                                      "nextCount"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "detailed"
                                        ]
                                      },
                                      "previousCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "nextCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "summary": {
                                        "type": "object",
                                        "properties": {
                                          "added": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "removed": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "modified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "reordered": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "added",
                                          "removed",
                                          "modified",
                                          "reordered"
                                        ]
                                      },
                                      "entries": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "verdict": {
                                              "type": "string",
                                              "enum": [
                                                "added",
                                                "removed",
                                                "modified",
                                                "reordered"
                                              ]
                                            },
                                            "label": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "fields": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "action",
                                                      "data",
                                                      "expected"
                                                    ]
                                                  },
                                                  "from": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "to": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "truncated": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "from",
                                                  "to"
                                                ]
                                              }
                                            },
                                            "position": {
                                              "type": "object",
                                              "properties": {
                                                "from": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                },
                                                "to": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                }
                                              },
                                              "required": [
                                                "from",
                                                "to"
                                              ]
                                            },
                                            "attachments": {
                                              "type": "object",
                                              "properties": {
                                                "added": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "ulid": {
                                                        "type": "string",
                                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                                      },
                                                      "filename": {
                                                        "type": [
                                                          "string",
                                                          "null"
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "ulid",
                                                      "filename"
                                                    ]
                                                  }
                                                },
                                                "removed": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "ulid": {
                                                        "type": "string",
                                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                                      },
                                                      "filename": {
                                                        "type": [
                                                          "string",
                                                          "null"
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "ulid",
                                                      "filename"
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "added",
                                                "removed"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "verdict",
                                            "label"
                                          ]
                                        }
                                      },
                                      "omittedCount": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "previousCount",
                                      "nextCount",
                                      "summary",
                                      "entries"
                                    ]
                                  }
                                ]
                              },
                              "visibilityChange": {
                                "type": "object",
                                "properties": {
                                  "allProjectsFrom": {
                                    "type": "boolean"
                                  },
                                  "allProjectsTo": {
                                    "type": "boolean"
                                  },
                                  "added": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "removed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "allProjectsFrom",
                                  "allProjectsTo",
                                  "added",
                                  "removed"
                                ]
                              },
                              "optionsChange": {
                                "type": "object",
                                "properties": {
                                  "added": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "removed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "renamed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "from": {
                                          "type": "string"
                                        },
                                        "to": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "from",
                                        "to"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "added",
                                  "removed",
                                  "renamed"
                                ]
                              },
                              "assigneeChange": {
                                "type": "object",
                                "properties": {
                                  "from": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "name"
                                    ]
                                  },
                                  "to": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "name"
                                    ]
                                  },
                                  "via": {
                                    "type": "string",
                                    "enum": [
                                      "open",
                                      "patch",
                                      "reconcile"
                                    ]
                                  }
                                },
                                "required": [
                                  "from",
                                  "to",
                                  "via"
                                ]
                              },
                              "runAggregates": {
                                "type": "object",
                                "properties": {
                                  "countPassed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countFailed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countBlocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countSkipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countUntested": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "totalDurationMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "projectedStatus": {
                                    "type": "string",
                                    "enum": [
                                      "passed",
                                      "failed",
                                      "aborted"
                                    ]
                                  }
                                },
                                "required": [
                                  "countPassed",
                                  "countFailed",
                                  "countBlocked",
                                  "countSkipped",
                                  "countUntested",
                                  "totalDurationMs",
                                  "projectedStatus"
                                ]
                              },
                              "bulkCases": {
                                "type": "object",
                                "properties": {
                                  "cases": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "caseDisplayId": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "titleSnapshot": {
                                          "type": "string"
                                        },
                                        "fromStatus": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "toStatus": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "fromAssignee": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "name"
                                          ]
                                        },
                                        "toAssignee": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "name"
                                          ]
                                        },
                                        "statusAtRemoval": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "skipped": {
                                          "type": "string",
                                          "enum": [
                                            "unchanged",
                                            "not_found",
                                            "locked"
                                          ]
                                        },
                                        "truncated": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "caseDisplayId",
                                        "titleSnapshot"
                                      ]
                                    }
                                  },
                                  "omittedCount": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0
                                  },
                                  "summary": {
                                    "type": "object",
                                    "properties": {
                                      "affected": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "unchanged": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "statusFrom": {
                                        "type": "string",
                                        "enum": [
                                          "untested",
                                          "retested",
                                          "passed",
                                          "failed",
                                          "skipped",
                                          "blocked"
                                        ]
                                      },
                                      "statusTo": {
                                        "type": "string",
                                        "enum": [
                                          "untested",
                                          "retested",
                                          "passed",
                                          "failed",
                                          "skipped",
                                          "blocked"
                                        ]
                                      },
                                      "assigneeFrom": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "name"
                                        ]
                                      },
                                      "assigneeTo": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "name"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "affected",
                                      "unchanged"
                                    ]
                                  }
                                },
                                "required": [
                                  "cases",
                                  "summary"
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "action",
                          "actor",
                          "entityType",
                          "entityUlid",
                          "entityLabel",
                          "metadata",
                          "createdAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "events",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orgs/{orgUlid}/audit-events/export": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "operationId": "exportOrgAuditEvents",
        "summary": "Export the workspace audit log as CSV",
        "description": "Downloads every audit event in the required, bounded window (max 366 days) as a single CSV artifact, one row per event, ordered chronologically. Requires organization membership with role owner or admin, AND the `auditExportEnabled` entitlement — both refusals are `403 forbidden` and indistinguishable on the wire. An exact count is taken before any row is read; a window whose count exceeds 25,000 events is refused `422 validation_failed` naming both the actual count and the ceiling. Rate-limited to 10 exports per organization per hour, independently of the test-case export rate limit. The export never mutates or deletes anything.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "orgUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Window start, inclusive — ISO-8601 UTC (`Z` designator required)"
            },
            "required": true,
            "description": "Window start, inclusive — ISO-8601 UTC (`Z` designator required)",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Window end, EXCLUSIVE (half-open range) — ISO-8601 UTC (`Z` designator required), at most 366 days after `from`"
            },
            "required": true,
            "description": "Window end, EXCLUSIVE (half-open range) — ISO-8601 UTC (`Z` designator required), at most 366 days after `from`",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "CSV export artifact, returned as a downloadable attachment (`Content-Disposition: attachment`)",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "CSV export artifact body, one row per audit event"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — requires owner or admin role, or the auditExportEnabled entitlement (indistinguishable on the wire)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Invalid or missing from/to, an inverted or over-366-day window, or the resolved count exceeds the 25,000-event ceiling (code: validation_failed)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Organization audit-export rate limit exceeded (code: too_many_requests)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/defects": {
      "get": {
        "tags": [
          "Runs"
        ],
        "operationId": "listRunDefects",
        "summary": "List defects linked to a test run",
        "description": "Returns distinct defects linked to any attempt in the run, each with the number of links within this run only.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Distinct linked defects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "defectNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "title": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "in_progress",
                              "resolved",
                              "closed"
                            ]
                          },
                          "linkCountInRun": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "systemFieldValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fieldUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "systemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionName": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionIcon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionColor": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "optionSystemKey": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "fieldUlid",
                                "value"
                              ]
                            }
                          }
                        },
                        "required": [
                          "ulid",
                          "defectNumber",
                          "title",
                          "status",
                          "linkCountInRun",
                          "systemFieldValues"
                        ]
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Run not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/runs/{runUlid}/audit-events": {
      "get": {
        "tags": [
          "Runs"
        ],
        "operationId": "listRunAuditEvents",
        "summary": "List audit events for a test run",
        "description": "Returns append-only audit events scoped to a single test run in reverse chronological order (ULID cursor). Any organization member who can read the run may call this endpoint (no owner/admin gate).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "runUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": false,
            "name": "actorUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "entityType",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Run-scoped audit event page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "project.created",
                              "project.updated",
                              "project.trashed",
                              "project.restored",
                              "project.deleted",
                              "suite.created",
                              "suite.updated",
                              "suite.deleted",
                              "suite.moved",
                              "test_case.created",
                              "test_case.updated",
                              "test_case.archived",
                              "test_case.restored",
                              "test_case.deleted",
                              "test_case.moved",
                              "milestone.created",
                              "milestone.updated",
                              "milestone.deleted",
                              "custom_field.created",
                              "custom_field.updated",
                              "custom_field.deleted",
                              "custom_field.options_reordered",
                              "core_section.renamed",
                              "core_section.reset",
                              "member.role_changed",
                              "member.removed",
                              "invitation.sent",
                              "invitation.resent",
                              "invitation.revoked",
                              "invitation.accepted",
                              "api_token.created",
                              "api_token.revoked",
                              "run.created",
                              "run.updated",
                              "run.closed",
                              "run.aborted",
                              "run.reopened",
                              "run.deleted",
                              "run.case_step_actual_result_set",
                              "run.case_added",
                              "run.case_marked",
                              "run.case_step_marked",
                              "run.case_assigned",
                              "run.reran_failed",
                              "run.case_retried",
                              "run.case_removed",
                              "run.result_attachment_committed",
                              "run.result_attachment_deleted",
                              "run.cases_bulk_marked",
                              "run.cases_bulk_assigned",
                              "run.cases_bulk_retried",
                              "run.cases_bulk_removed",
                              "run.cases_bulk_result_submitted",
                              "run.cloned",
                              "defect.created",
                              "defect.updated",
                              "defect.status_changed",
                              "defect.reopened",
                              "defect.deleted",
                              "defect.linked",
                              "defect.unlinked",
                              "defect.attachment_added",
                              "defect.attachment_deleted",
                              "defect.commented",
                              "defect.comment_updated",
                              "defect.comment_deleted",
                              "defect.case_linked",
                              "defect.case_unlinked",
                              "defect.case_dismissed",
                              "test_case.commented",
                              "test_case.comment_updated",
                              "test_case.comment_deleted",
                              "test_case.comment_pinned",
                              "test_case.comment_unpinned",
                              "defect.comment_pinned",
                              "defect.comment_unpinned",
                              "environment.created",
                              "environment.updated",
                              "environment.deleted",
                              "milestone.status_changed",
                              "run.milestone_assigned",
                              "run.milestone_removed",
                              "configuration_group.created",
                              "configuration_group.updated",
                              "configuration_group.deleted",
                              "configuration.created",
                              "configuration.updated",
                              "configuration.deleted",
                              "test_plan.created",
                              "test_plan.updated",
                              "test_plan.deleted",
                              "test_plan.run_generated",
                              "test_plan.configurations_updated",
                              "test_plan.status_changed",
                              "test_plan.case_assignee_changed",
                              "organization.attachments_bulk_deleted",
                              "test_case.imported",
                              "test_case.cloned",
                              "suite.cloned",
                              "test_case.bulk_cloned",
                              "oauth_grant.created",
                              "oauth_grant.revoked"
                            ]
                          },
                          "actor": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "email": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "displayName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "firstName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "lastName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "avatarVersion": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "email",
                                  "displayName",
                                  "firstName",
                                  "lastName",
                                  "avatarKey",
                                  "avatarVersion"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "system"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind"
                                ]
                              }
                            ]
                          },
                          "entityType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "entityUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "entityLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "runUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "changes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "from": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "to": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "fromLabel": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "toLabel": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "from",
                                    "to"
                                  ]
                                }
                              },
                              "customFieldChanges": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "fieldUlid": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "fieldLabel": {
                                      "type": "string"
                                    },
                                    "from": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "to": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "boolean"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "fieldUlid",
                                    "fieldLabel",
                                    "from",
                                    "to"
                                  ]
                                }
                              },
                              "stepsChange": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "replaced"
                                        ]
                                      },
                                      "previousCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "nextCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "previousCount",
                                      "nextCount"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "detailed"
                                        ]
                                      },
                                      "previousCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "nextCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "summary": {
                                        "type": "object",
                                        "properties": {
                                          "added": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "removed": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "modified": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "reordered": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "added",
                                          "removed",
                                          "modified",
                                          "reordered"
                                        ]
                                      },
                                      "entries": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "verdict": {
                                              "type": "string",
                                              "enum": [
                                                "added",
                                                "removed",
                                                "modified",
                                                "reordered"
                                              ]
                                            },
                                            "label": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "fields": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "action",
                                                      "data",
                                                      "expected"
                                                    ]
                                                  },
                                                  "from": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "to": {
                                                    "type": [
                                                      "string",
                                                      "null"
                                                    ]
                                                  },
                                                  "truncated": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "from",
                                                  "to"
                                                ]
                                              }
                                            },
                                            "position": {
                                              "type": "object",
                                              "properties": {
                                                "from": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                },
                                                "to": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                }
                                              },
                                              "required": [
                                                "from",
                                                "to"
                                              ]
                                            },
                                            "attachments": {
                                              "type": "object",
                                              "properties": {
                                                "added": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "ulid": {
                                                        "type": "string",
                                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                                      },
                                                      "filename": {
                                                        "type": [
                                                          "string",
                                                          "null"
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "ulid",
                                                      "filename"
                                                    ]
                                                  }
                                                },
                                                "removed": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "ulid": {
                                                        "type": "string",
                                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                                      },
                                                      "filename": {
                                                        "type": [
                                                          "string",
                                                          "null"
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "ulid",
                                                      "filename"
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "added",
                                                "removed"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "verdict",
                                            "label"
                                          ]
                                        }
                                      },
                                      "omittedCount": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "previousCount",
                                      "nextCount",
                                      "summary",
                                      "entries"
                                    ]
                                  }
                                ]
                              },
                              "visibilityChange": {
                                "type": "object",
                                "properties": {
                                  "allProjectsFrom": {
                                    "type": "boolean"
                                  },
                                  "allProjectsTo": {
                                    "type": "boolean"
                                  },
                                  "added": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "removed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "allProjectsFrom",
                                  "allProjectsTo",
                                  "added",
                                  "removed"
                                ]
                              },
                              "optionsChange": {
                                "type": "object",
                                "properties": {
                                  "added": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "removed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "name"
                                      ]
                                    }
                                  },
                                  "renamed": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "from": {
                                          "type": "string"
                                        },
                                        "to": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "from",
                                        "to"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "added",
                                  "removed",
                                  "renamed"
                                ]
                              },
                              "assigneeChange": {
                                "type": "object",
                                "properties": {
                                  "from": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "name"
                                    ]
                                  },
                                  "to": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "properties": {
                                      "ulid": {
                                        "type": "string",
                                        "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "ulid",
                                      "name"
                                    ]
                                  },
                                  "via": {
                                    "type": "string",
                                    "enum": [
                                      "open",
                                      "patch",
                                      "reconcile"
                                    ]
                                  }
                                },
                                "required": [
                                  "from",
                                  "to",
                                  "via"
                                ]
                              },
                              "runAggregates": {
                                "type": "object",
                                "properties": {
                                  "countPassed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countFailed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countBlocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countSkipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "countUntested": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "totalDurationMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "projectedStatus": {
                                    "type": "string",
                                    "enum": [
                                      "passed",
                                      "failed",
                                      "aborted"
                                    ]
                                  }
                                },
                                "required": [
                                  "countPassed",
                                  "countFailed",
                                  "countBlocked",
                                  "countSkipped",
                                  "countUntested",
                                  "totalDurationMs",
                                  "projectedStatus"
                                ]
                              },
                              "bulkCases": {
                                "type": "object",
                                "properties": {
                                  "cases": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "ulid": {
                                          "type": "string",
                                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                        },
                                        "caseDisplayId": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "titleSnapshot": {
                                          "type": "string"
                                        },
                                        "fromStatus": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "toStatus": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "fromAssignee": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "name"
                                          ]
                                        },
                                        "toAssignee": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "ulid": {
                                              "type": "string",
                                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "ulid",
                                            "name"
                                          ]
                                        },
                                        "statusAtRemoval": {
                                          "type": "string",
                                          "enum": [
                                            "untested",
                                            "retested",
                                            "passed",
                                            "failed",
                                            "skipped",
                                            "blocked"
                                          ]
                                        },
                                        "skipped": {
                                          "type": "string",
                                          "enum": [
                                            "unchanged",
                                            "not_found",
                                            "locked"
                                          ]
                                        },
                                        "truncated": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "ulid",
                                        "caseDisplayId",
                                        "titleSnapshot"
                                      ]
                                    }
                                  },
                                  "omittedCount": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0
                                  },
                                  "summary": {
                                    "type": "object",
                                    "properties": {
                                      "affected": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "unchanged": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "statusFrom": {
                                        "type": "string",
                                        "enum": [
                                          "untested",
                                          "retested",
                                          "passed",
                                          "failed",
                                          "skipped",
                                          "blocked"
                                        ]
                                      },
                                      "statusTo": {
                                        "type": "string",
                                        "enum": [
                                          "untested",
                                          "retested",
                                          "passed",
                                          "failed",
                                          "skipped",
                                          "blocked"
                                        ]
                                      },
                                      "assigneeFrom": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "name"
                                        ]
                                      },
                                      "assigneeTo": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "properties": {
                                          "ulid": {
                                            "type": "string",
                                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "ulid",
                                          "name"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "affected",
                                      "unchanged"
                                    ]
                                  }
                                },
                                "required": [
                                  "cases",
                                  "summary"
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "action",
                          "actor",
                          "entityType",
                          "entityUlid",
                          "entityLabel",
                          "metadata",
                          "createdAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "required": [
                    "events",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Run not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/coverage-matrix": {
      "get": {
        "tags": [
          "Coverage"
        ],
        "operationId": "getCoverageMatrix",
        "summary": "Get coverage matrix",
        "description": "Returns the project coverage matrix: live environments as bounded columns and a page-paginated set of test-case rows, each row carrying its latest result status per environment column. Empty cells (no result) have `status: null`. Results from runs with a `null` `environment_id` are excluded. Read-only; no audit event emitted.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "suiteUlid",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "title",
                "id"
              ]
            },
            "required": false,
            "name": "searchBy",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Coverage matrix page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "environmentId": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "environmentId",
                          "name",
                          "slug"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rows": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "testCaseId": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "caseNumber": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "title": {
                                "type": "string"
                              },
                              "suite": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "ulid",
                                  "name"
                                ]
                              },
                              "cells": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "environmentId": {
                                      "type": "string",
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    },
                                    "status": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "enum": [
                                        "untested",
                                        "retested",
                                        "passed",
                                        "failed",
                                        "skipped",
                                        "blocked",
                                        null
                                      ]
                                    },
                                    "executedAt": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "minimum": 0
                                    },
                                    "runUlid": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                    }
                                  },
                                  "required": [
                                    "environmentId",
                                    "status",
                                    "executedAt",
                                    "runUlid"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "testCaseId",
                              "caseNumber",
                              "title",
                              "suite",
                              "cells"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "integer"
                        },
                        "pageSize": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "items",
                        "page",
                        "pageSize",
                        "total"
                      ]
                    }
                  },
                  "required": [
                    "columns",
                    "rows"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Project not found in the active organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/exports": {
      "get": {
        "tags": [
          "Exports"
        ],
        "operationId": "exportTestCases",
        "summary": "Export a project's test cases",
        "description": "Downloads active (non-archived) test cases as a single artifact in the requested `format`. Scope defaults to the whole project; `scope=suite` bounds the export to one suite ULID plus all of its descendant suites; `scope=filtered` re-evaluates the `q`/`cf` filter params server-side over the same repository filter contract used by the test-case list/search endpoints. Attachments are never included. Resolves at most `EXPORT_MAX_CASES` cases per request — an over-ceiling scope returns `422 too_many_cases` before any row is read. Member role or higher is required; viewers receive `403`. Rate-limited per organization.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "xml",
                "csv",
                "xlsx"
              ],
              "description": "Export artifact format"
            },
            "required": true,
            "description": "Export artifact format",
            "name": "format",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "project",
                "suite",
                "filtered"
              ],
              "description": "Export scope: project (default — the whole project), suite (the suite ULID given by `suite`, plus all descendant suites), or filtered (server re-evaluates `q`/`cf` over the project)"
            },
            "required": false,
            "description": "Export scope: project (default — the whole project), suite (the suite ULID given by `suite`, plus all descendant suites), or filtered (server re-evaluates `q`/`cf` over the project)",
            "name": "scope",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Suite ULID; required when scope=suite. Descendant suites are included."
            },
            "required": false,
            "description": "Suite ULID; required when scope=suite. Descendant suites are included.",
            "name": "suite",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Substring filter re-evaluated server-side; applies when scope=filtered (same contract as the test-case list/search endpoints)"
            },
            "required": false,
            "description": "Substring filter re-evaluated server-side; applies when scope=filtered (same contract as the test-case list/search endpoints)",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Custom field filter: <fieldUlid>:<value[,value…]>, repeatable; applies when scope=filtered"
            },
            "required": false,
            "description": "Custom field filter: <fieldUlid>:<value[,value…]>, repeatable; applies when scope=filtered",
            "name": "cf",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Serialized export artifact for the requested format, returned as a downloadable attachment (`Content-Disposition: attachment`)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "description": "Serialized export artifact body for a text-based format"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string",
                  "description": "Serialized export artifact body for a text-based format"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "Serialized export artifact body for a text-based format"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Binary XLSX export artifact (OOXML spreadsheet, inline strings)"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — viewer role cannot export",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or scope=suite references a suite ULID that does not exist in this project (code: not_found)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unlisted format or invalid query (code: validation_failed), or the resolved scope exceeds the EXPORT_MAX_CASES ceiling (code: too_many_cases)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Organization export rate limit exceeded (code: too_many_requests)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{projectId}/plans": {
      "get": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "listPlans",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Test plans page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "planNumber": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "author": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "displayName": {
                                    "type": "string"
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "displayName",
                                  "avatarKey"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "caseCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "completed"
                            ]
                          },
                          "milestoneUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "milestone": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "progress": {
                            "type": "object",
                            "properties": {
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "closedRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "counts": {
                                "type": "object",
                                "properties": {
                                  "passed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "blocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "skipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "untested": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "passed",
                                  "failed",
                                  "blocked",
                                  "skipped",
                                  "untested"
                                ],
                                "additionalProperties": false
                              },
                              "byConfiguration": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "comboKey": {
                                      "type": "string"
                                    },
                                    "values": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "groupName": {
                                            "type": "string"
                                          },
                                          "valueName": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "groupName",
                                          "valueName"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "totalRuns": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "closedRuns": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "counts": {
                                      "type": "object",
                                      "properties": {
                                        "passed": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "failed": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "blocked": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "skipped": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "untested": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      },
                                      "required": [
                                        "passed",
                                        "failed",
                                        "blocked",
                                        "skipped",
                                        "untested"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "comboKey",
                                    "values",
                                    "totalRuns",
                                    "closedRuns",
                                    "counts"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "totalRuns",
                              "closedRuns",
                              "counts",
                              "byConfiguration"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "planNumber",
                          "name",
                          "description",
                          "author",
                          "caseCount",
                          "status",
                          "milestoneUlid",
                          "milestone",
                          "progress",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items",
                    "page",
                    "pageSize",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "createPlan",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "completed"
                    ],
                    "default": "draft"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Plan created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "planNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "caseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "totalRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closedRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "passed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocked": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "skipped": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "untested": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "passed",
                            "failed",
                            "blocked",
                            "skipped",
                            "untested"
                          ],
                          "additionalProperties": false
                        },
                        "byConfiguration": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "comboKey": {
                                "type": "string"
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "groupName": {
                                      "type": "string"
                                    },
                                    "valueName": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "groupName",
                                    "valueName"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "closedRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "counts": {
                                "type": "object",
                                "properties": {
                                  "passed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "blocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "skipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "untested": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "passed",
                                  "failed",
                                  "blocked",
                                  "skipped",
                                  "untested"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "comboKey",
                              "values",
                              "totalRuns",
                              "closedRuns",
                              "counts"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "totalRuns",
                        "closedRuns",
                        "counts",
                        "byConfiguration"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "planNumber",
                    "name",
                    "description",
                    "author",
                    "caseCount",
                    "status",
                    "milestoneUlid",
                    "milestone",
                    "progress",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Plan name already in use in this project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}": {
      "get": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "getPlan",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Test plan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "planNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "caseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "totalRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closedRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "passed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocked": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "skipped": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "untested": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "passed",
                            "failed",
                            "blocked",
                            "skipped",
                            "untested"
                          ],
                          "additionalProperties": false
                        },
                        "byConfiguration": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "comboKey": {
                                "type": "string"
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "groupName": {
                                      "type": "string"
                                    },
                                    "valueName": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "groupName",
                                    "valueName"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "closedRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "counts": {
                                "type": "object",
                                "properties": {
                                  "passed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "blocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "skipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "untested": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "passed",
                                  "failed",
                                  "blocked",
                                  "skipped",
                                  "untested"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "comboKey",
                              "values",
                              "totalRuns",
                              "closedRuns",
                              "counts"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "totalRuns",
                        "closedRuns",
                        "counts",
                        "byConfiguration"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "planNumber",
                    "name",
                    "description",
                    "author",
                    "caseCount",
                    "status",
                    "milestoneUlid",
                    "milestone",
                    "progress",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "updatePlan",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "completed"
                    ]
                  },
                  "milestoneId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plan updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "projectUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "planNumber": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "author": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "avatarKey": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "displayName",
                            "avatarKey"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "api_token"
                              ]
                            },
                            "ulid": {
                              "type": "string",
                              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "ulid",
                            "name"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "caseCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed"
                      ]
                    },
                    "milestoneUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "milestone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "ulid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ulid",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "progress": {
                      "type": "object",
                      "properties": {
                        "totalRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closedRuns": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "passed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocked": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "skipped": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "untested": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "passed",
                            "failed",
                            "blocked",
                            "skipped",
                            "untested"
                          ],
                          "additionalProperties": false
                        },
                        "byConfiguration": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "comboKey": {
                                "type": "string"
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "groupName": {
                                      "type": "string"
                                    },
                                    "valueName": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "groupName",
                                    "valueName"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "closedRuns": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "counts": {
                                "type": "object",
                                "properties": {
                                  "passed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "blocked": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "skipped": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "untested": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "passed",
                                  "failed",
                                  "blocked",
                                  "skipped",
                                  "untested"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "comboKey",
                              "values",
                              "totalRuns",
                              "closedRuns",
                              "counts"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "totalRuns",
                        "closedRuns",
                        "counts",
                        "byConfiguration"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "ulid",
                    "projectUlid",
                    "planNumber",
                    "name",
                    "description",
                    "author",
                    "caseCount",
                    "status",
                    "milestoneUlid",
                    "milestone",
                    "progress",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Plan name already in use in this project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "deletePlan",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Plan soft-deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}/cases": {
      "get": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "listPlanCases",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Selected cases in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "assigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "priority": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lifecycleStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "ulid",
                          "caseUlid",
                          "displayId",
                          "title",
                          "suiteUlid",
                          "suiteName",
                          "position",
                          "assigneeUlid"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "replacePlanCases",
        "summary": "Replace the plan case selection",
        "description": "Replace-set semantics: the entire selection is replaced with the supplied ordered list of case ULIDs. An empty array clears the selection. Duplicate ULIDs are rejected (422).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    }
                  },
                  "caseAssignees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "caseUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        },
                        "assigneeUlid": {
                          "type": "string",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                        }
                      },
                      "required": [
                        "caseUlid",
                        "assigneeUlid"
                      ]
                    }
                  }
                },
                "required": [
                  "caseUlids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "New selection in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "caseUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "displayId": {
                            "type": "string",
                            "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "suiteUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "suiteName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "assigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "priority": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lifecycleStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "ulid",
                          "caseUlid",
                          "displayId",
                          "title",
                          "suiteUlid",
                          "suiteName",
                          "position",
                          "assigneeUlid"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan or case not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}/runs": {
      "get": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "listPlanRuns",
        "summary": "List the runs generated from a plan",
        "description": "Returns every run linked to the plan. Each item is a full `RunResponse` (the SAME shape the runs list returns — environment, author, per-outcome counts, aggregated status, timing) PLUS its configuration combination identity. `comboKey` is reconstructed at read time from the run's configuration snapshot using the same `computeComboKey` derivation the configuration matrix uses, so a combination maps 1:1 to its generated run; `comboLabel` is the configuration value names joined for display (empty for a plain run). Returns an empty list when the plan has no generated runs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Generated runs for the plan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "projectUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "environment": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "name",
                              "slug"
                            ]
                          },
                          "environmentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "environmentName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "defaultAssigneeUlid": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "open",
                              "closed"
                            ]
                          },
                          "startedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "finishedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "closedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "abortedAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "untested",
                              "retested",
                              "passed",
                              "failed",
                              "skipped",
                              "blocked"
                            ]
                          },
                          "total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "executed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "passRate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "author": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "user"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "displayName": {
                                    "type": "string"
                                  },
                                  "avatarKey": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "displayName",
                                  "avatarKey"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "api_token"
                                    ]
                                  },
                                  "ulid": {
                                    "type": "string",
                                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "ulid",
                                  "name"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "counts": {
                            "type": "object",
                            "properties": {
                              "passed": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "failed": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "blocked": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "skipped": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "untested": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "retested": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "passed",
                              "failed",
                              "blocked",
                              "skipped",
                              "untested"
                            ]
                          },
                          "firstResultAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "lastResultAt": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "totalDurationMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "estimate": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "milestoneId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "milestone": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "ulid": {
                                "type": "string",
                                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ulid",
                              "name"
                            ]
                          },
                          "configurations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ulid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "configurationUlid": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "groupName": {
                                  "type": "string"
                                },
                                "valueName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "ulid",
                                "configurationUlid",
                                "groupName",
                                "valueName"
                              ]
                            }
                          },
                          "comboKey": {
                            "type": "string"
                          },
                          "comboLabel": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "projectUlid",
                          "name",
                          "description",
                          "environment",
                          "environmentId",
                          "environmentName",
                          "defaultAssigneeUlid",
                          "state",
                          "startedAt",
                          "finishedAt",
                          "closedAt",
                          "abortedAt",
                          "status",
                          "total",
                          "executed",
                          "passRate",
                          "author",
                          "counts",
                          "firstResultAt",
                          "lastResultAt",
                          "totalDurationMs",
                          "estimate",
                          "milestoneId",
                          "milestone",
                          "configurations",
                          "comboKey",
                          "comboLabel"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}/cases/{planCaseUlid}": {
      "patch": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "patchPlanCase",
        "summary": "Update the assignee of a single plan case",
        "description": "Sets or clears the per-case assignee for a single test plan case. Pass a member ULID to assign, or null to clear. Does not back-propagate to existing generated runs (snapshot semantics). Emits `test_plan.case_assignee_changed` when the value changes.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planCaseUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigneeUlid": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                  }
                },
                "required": [
                  "assigneeUlid"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated plan case",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ulid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "caseUlid": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "displayId": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9]*-[1-9][0-9]*$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "suiteUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "suiteName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "position": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "assigneeUlid": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "priority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lifecycleStatus": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "ulid",
                    "caseUlid",
                    "displayId",
                    "title",
                    "suiteUlid",
                    "suiteName",
                    "position",
                    "assigneeUlid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan, plan case, or assignee not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}/configurations": {
      "get": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "listPlanConfigurations",
        "summary": "Get the plan's configuration value selection",
        "description": "Returns the plan's currently selected configuration values with group context, ordered by group position then value position.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Selected configuration values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupUlid",
                          "groupName",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "replacePlanConfigurations",
        "summary": "Replace the plan's configuration value selection",
        "description": "Replace-set semantics: the entire configuration value selection is replaced with the supplied set of configuration ULIDs. An empty array clears the selection. Duplicate ULIDs are rejected (422). Each ULID must reference a live configuration value in the plan's project. Emits `test_plan.configurations_updated`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "configurationUlids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                    },
                    "maxItems": 200
                  }
                },
                "required": [
                  "configurationUlids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "New configuration value selection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ulid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "configurationUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupUlid": {
                            "type": "string",
                            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                          },
                          "groupName": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "ulid",
                          "configurationUlid",
                          "groupUlid",
                          "groupName",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan or configuration value not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}/excluded-combinations": {
      "put": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "setExcludedCombinations",
        "summary": "Replace the plan's excluded combination key set",
        "description": "Replace-set semantics: the entire excluded combination key set is replaced. A `comboKey` is the sorted, colon-joined configuration value ULIDs computed by `computeComboKey`. Non-candidate keys (matching no current combination) are accepted and stored inert. Duplicate keys are rejected (422). An empty array clears all exclusions. Emits `test_plan.configurations_updated`.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "comboKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "comboKeys"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored excluded combination keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comboKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "comboKeys"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/plans/{planUlid}/combinations": {
      "get": {
        "tags": [
          "Test Plans"
        ],
        "operationId": "listPlanCombinations",
        "summary": "Preview the plan's Cartesian combinations",
        "description": "Returns the full Cartesian product of the plan's current configuration value selection with per-combo `included` flags. `includedCount` is the number of combinations still eligible for a run — create one per combination with `POST /projects/{projectId}/runs` (`planUlid` + that combination's `configurationUlids`). A plan with no configuration selection returns one empty combination (`totalCount = 1`, `includedCount = 1`).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
            },
            "required": true,
            "name": "planUlid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Combinations preview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "comboKey": {
                            "type": "string"
                          },
                          "included": {
                            "type": "boolean"
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "configurationUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "groupUlid": {
                                  "type": "string",
                                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                                },
                                "groupName": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "configurationUlid",
                                "groupUlid",
                                "groupName",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "comboKey",
                          "included",
                          "values"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "includedCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "totalCount": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "items",
                    "includedCount",
                    "totalCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Plan not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "validation_failed",
                            "not_found",
                            "conflict",
                            "last_owner",
                            "unauthorized",
                            "forbidden",
                            "email_not_verified",
                            "email_send_failed",
                            "turnstile_failed",
                            "too_many_requests",
                            "unsupported_media_type",
                            "internal_error",
                            "immutable_field",
                            "system_field",
                            "system_field_readonly",
                            "field_has_values",
                            "not_system_field",
                            "storage_quota_exceeded",
                            "staging_already_committed",
                            "file_too_large",
                            "too_many_cases",
                            "too_many_attachments",
                            "too_many_suites",
                            "parse_failed",
                            "empty_import",
                            "organization_suspended",
                            "seat_limit_exceeded",
                            "project_limit_exceeded",
                            "api_result_limit_exceeded",
                            "email_recipient_suppressed"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
